Exemplo n.º 1
0
  def test_local_user_contexts_returns_user_context_with_same_steam(self):
    self._make_folders_in_temp_directory_for_ids(['1234'])
    s = model.Steam(self.tempdir)

    contexts = steam.local_user_contexts(s)
    self.assertEqual(len(contexts), 1)
    self.assertEqual(contexts[0].steam, s)
Exemplo n.º 2
0
    def test_local_user_contexts_returns_user_context_with_same_steam(self):
        self._make_folders_in_temp_directory_for_ids(['1234'])
        s = model.Steam(self.tempdir)

        contexts = steam.local_user_contexts(s)
        self.assertEqual(len(contexts), 1)
        self.assertEqual(contexts[0].steam, s)
Exemplo n.º 3
0
  def __init__(self, steam):
    self.steam = steam

    logger.debug("Initializing Ice")
    # We want to ignore the anonymous context, cause theres no reason to sync
    # ROMs for it since you cant log in as said user.
    is_user_context = lambda context: context.user_id != 'anonymous'
    self.users = filter(is_user_context, steam_module.local_user_contexts(self.steam))
Exemplo n.º 4
0
    def __init__(self, steam):
        self.steam = steam

        logger.debug("Initializing Ice")
        # We want to ignore the anonymous context, cause theres no reason to sync
        # ROMs for it since you cant log in as said user.
        is_user_context = lambda context: context.user_id != 'anonymous'
        self.users = filter(is_user_context,
                            steam_module.local_user_contexts(self.steam))
Exemplo n.º 5
0
  def __init__(self, steam, filesystem, app_settings):
    self.steam = steam
    self.filesystem = filesystem

    # We want to ignore the anonymous context, cause theres no reason to sync
    # ROMs for it since you cant log in as said user.
    is_user_context = lambda context: context.user_id != 'anonymous'
    self.users = filter(is_user_context, steam_module.local_user_contexts(self.steam))

    logger.debug("Initializing Ice")

    self.app_settings = app_settings

    parser = ROMParser()
    self.rom_finder = ROMFinder(app_settings.config, filesystem, parser)
Exemplo n.º 6
0
  def __init__(self, steam, filesystem, app_settings,options):
    self.app = Qt.QApplication(sys.argv)
    QtWidgets.QMainWindow.__init__(self)
    self.steam = steam
    self.filesystem = filesystem

    is_user_context = lambda context: context.user_id != 'anonymous'
    self.users = filter(is_user_context, steam_module.local_user_contexts(self.steam))

    logger.debug("Initializing Ice")

    self.app_settings = app_settings

    parser = ROMParser()
    self.rom_finder = ROMFinder(app_settings.config, filesystem, parser)
    self.options = options
Exemplo n.º 7
0
    def __init__(self, steam, filesystem, app_settings):
        self.steam = steam
        self.filesystem = filesystem

        # We want to ignore the anonymous context, cause theres no reason to sync
        # ROMs for it since you cant log in as said user.
        is_user_context = lambda context: context.user_id != 'anonymous'
        self.users = filter(is_user_context,
                            steam_module.local_user_contexts(self.steam))

        logger.debug("Initializing Ice")

        self.app_settings = app_settings

        parser = ROMParser()
        self.rom_finder = ROMFinder(app_settings.config, filesystem, parser)
Exemplo n.º 8
0
  def main(self, dry_run=False):
    if self.steam is None:
      self.logger.error("Cannot run Ice because Steam doesn't appear to be installed")
      return

    self.logger.info("=========== Starting Ice ===========")
    try:
      self.validate_base_environment()
      self.validate_configuration(self.config)
    except EnvCheckerError as e:
      self.logger.info("Ice cannot run because of issues with your system.\n")
      self.logger.info("* %s" % e.message)
      self.logger.info("\nPlease resolve these issues and try running Ice again")
      return
    # TODO: Create any missing directories that Ice will need
    log_configuration(self.logger, self.config)
    for user_context in steam.local_user_contexts(self.steam):
      self.logger.info("=========== User: %s ===========" % str(user_context.user_id))
      self.run_for_user(user_context, dry_run=dry_run)
Exemplo n.º 9
0
    def main(self, dry_run=False):
        if self.steam is None:
            logger.error(
                "Cannot run Ice because Steam doesn't appear to be installed")
            return

        logger.info("=========== Starting Ice ===========")
        try:
            self.validate_base_environment()
            self.validate_configuration(self.config)
        except EnvCheckerError as e:
            logger.info("Ice cannot run because of issues with your system.\n")
            logger.info("* %s" % e.message)
            logger.info(
                "\nPlease resolve these issues and try running Ice again")
            return
        # TODO: Create any missing directories that Ice will need
        log_configuration(self.config)
        for user_context in steam.local_user_contexts(self.steam):
            logger.info("=========== User: %s ===========" %
                        str(user_context.user_id))
            self.run_for_user(user_context, dry_run=dry_run)
Exemplo n.º 10
0
 def test_local_user_contexts_returns_none_if_steam_is_none(self):
     self.assertIsNone(steam.local_user_contexts(None))
Exemplo n.º 11
0
 def test_local_user_contexts_returns_none_if_steam_is_none(self):
   self.assertIsNone(steam.local_user_contexts(None))