hgext/convert/bzr.py
changeset 7973 db3a68fd9387
parent 7060 972cce34f345
child 8037 ffbebfb6b8d4
--- a/hgext/convert/bzr.py	Sat Apr 04 19:43:00 2009 +0200
+++ b/hgext/convert/bzr.py	Sat Apr 04 12:28:13 2009 -0500
@@ -27,15 +27,15 @@
     def __init__(self, ui, path, rev=None):
         super(bzr_source, self).__init__(ui, path, rev=rev)
 
+        if not os.path.exists(os.path.join(path, '.bzr')):
+            raise NoRepo('%s does not look like a Bazaar repo' % path)
+
         try:
             # access bzrlib stuff
             branch
         except NameError:
             raise NoRepo('Bazaar modules could not be loaded')
 
-        if not os.path.exists(os.path.join(path, '.bzr')):
-            raise NoRepo('%s does not look like a Bazaar repo' % path)
-
         path = os.path.abspath(path)
         self.branch = branch.Branch.open(path)
         self.sourcerepo = self.branch.repository