hghave: fix has_bzr() to not try to import RevisionSpec as module
Since RevisionSpec isn't a module, "import bzrlib.revisionspec.RevisionSpec"
would always raise ImportError.
--- a/tests/hghave.py Mon Aug 22 14:44:14 2016 +0200
+++ b/tests/hghave.py Sun Sep 04 17:19:44 2016 +0900
@@ -113,9 +113,10 @@
import bzrlib.bzrdir
import bzrlib.errors
import bzrlib.revision
- import bzrlib.revisionspec.RevisionSpec
+ import bzrlib.revisionspec
+ bzrlib.revisionspec.RevisionSpec
return bzrlib.__doc__ is not None
- except ImportError:
+ except (AttributeError, ImportError):
return False
@checkvers("bzr", "Canonical's Bazaar client >= %s", (1.14,))