Commits

Jason R. Coombs committed 2ae059b

Fixed issue where an exception would occur when mercurial libraries weren't present.

  • Participants
  • Parent commits 944439d
  • Tags 0.5

Comments (0)

Files changed (1)

File hgtools/__init__.py

 		try:
 			from mercurial.__version__ import version
 			from mercurial import hg, ui, cmdutil
+			from mercurial.error import RepoError
 		except ImportError:
 			pass
 
 		try:
-			from mercurial.error import RepoError
-		except ImportError:
 			# mercurial < 1.2
 			from mercurial.repo import RepoError
+		except ImportError:
+			pass
+
 		del self
 		globals().update(vars())
 
 		for mgr in HGRepoManager.get_valid_managers(dirname):
 			try:
 				return mgr.find_files()
-			except BaseException, e:
+			except Exception, e:
 				distutils.log.warn("Error in hgtools.%s: %s", mgr, e)
-	except BaseException, e:
+	except Exception, e:
 		distutils.log.warn("Error getting managers in hgtools.file_finder_plugin: %s", e)
 	return []