~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-11-05 17:39:54 UTC
  • mfrom: (5524.1.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20101105173954-s66k204jmq4ts8l1
(vila) Open trunk again as 2.3dev4 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
723
723
                    self.bzrdir.open_repository()
724
724
                except NoRepositoryPresent:
725
725
                    self.detail = ''
 
726
                except Exception:
 
727
                    # Just ignore unexpected errors.  Raising arbitrary errors
 
728
                    # during str(err) can provoke strange bugs.  Concretely
 
729
                    # Launchpad's codehosting managed to raise NotBranchError
 
730
                    # here, and then get stuck in an infinite loop/recursion
 
731
                    # trying to str() that error.  All this error really cares
 
732
                    # about that there's no working repository there, and if
 
733
                    # open_repository() fails, there probably isn't.
 
734
                    self.detail = ''
726
735
                else:
727
736
                    self.detail = ': location is a repository'
728
737
            else: