compat: improve detection of Mercurial 4.6 stable
authorAndrew Fischer <andrew@apastron.co>
Tue, 31 Jul 2018 07:38:37 -0500
branchstable
changeset 3917 ca7f02c9fa57
parent 3916 b103685a082b
child 3918 66a863bb6401
child 3920 202413cab59f
child 3921 28824ad64a12
compat: improve detection of Mercurial 4.6 fixed case where AttributeError can be thrown when importing wireproto
hgext3rd/topic/discovery.py
--- a/hgext3rd/topic/discovery.py	Tue Jul 31 13:06:20 2018 +0200
+++ b/hgext3rd/topic/discovery.py	Tue Jul 31 07:38:37 2018 -0500
@@ -16,7 +16,7 @@
 try:
     from mercurial import wireproto
     wireproto.branchmap
-except ImportError: # <= hg-4.5
+except (AttributeError, ImportError): # <= hg-4.5
     from mercurial import wireprotov1server as wireproto
 
 def _headssummary(orig, pushop, *args, **kwargs):