Esempio n. 1
0
 def run(self):
     """Install packages as long as you can.
     """
     logs.register(self.getName())
     try:
         while True:
             task = self.manager.get_work()
             if task is WORK_DONE:
                 break
             self.manager.mark_done(self.process(task))
     except Exception, error:
         self.manager.mark_failed(error)
Esempio n. 2
0
 def run(self):
     """Install packages as long as you can.
     """
     logs.register(self.getName())
     try:
         while True:
             requirement = self.manager.get_requirement()
             if requirement is None:
                 self.manager.wait_for_requirements()
                 continue
             if requirement is INSTALLATION_DONE:
                 break
             self.manager.mark_installed(
                 requirement, self.install(requirement))
     except Exception, error:
         self.manager.mark_failed(error)