~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/codehosting/codeimport/worker.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-03 11:23:34 UTC
  • mfrom: (13457.6.16 upgrade-stderr)
  • Revision ID: launchpad@pqm.canonical.com-20110803112334-acnupsa7jmzmdeet
[r=stevenk][bug=819751] Fix the implementation of several methods in
 LoggingUIFactory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
601
601
    def _doImport(self):
602
602
        self._logger.info("Starting job.")
603
603
        saved_factory = bzrlib.ui.ui_factory
604
 
        bzrlib.ui.ui_factory = LoggingUIFactory(
605
 
            writer=lambda m: self._logger.info('%s', m))
 
604
        bzrlib.ui.ui_factory = LoggingUIFactory(logger=self._logger)
606
605
        try:
607
606
            self._logger.info(
608
607
                "Getting exising bzr branch from central store.")
635
634
            except Exception, e:
636
635
                if e.__class__ in self.unsupported_feature_exceptions:
637
636
                    self._logger.info(
638
 
                        "Unable to import branch because of limitations in Bazaar.")
 
637
                        "Unable to import branch because of limitations in "
 
638
                        "Bazaar.")
639
639
                    self._logger.info(str(e))
640
 
                    return CodeImportWorkerExitCode.FAILURE_UNSUPPORTED_FEATURE
 
640
                    return (
 
641
                        CodeImportWorkerExitCode.FAILURE_UNSUPPORTED_FEATURE)
641
642
                elif e.__class__ in self.invalid_branch_exceptions:
642
643
                    self._logger.info("Branch invalid: %s", e(str))
643
644
                    return CodeImportWorkerExitCode.FAILURE_INVALID