changeset 1037:da62ef0569bb

compat: fix fallback for ui.passwordmgr The fallback introduced in 05c8aa7d3edc failed to work on hg < 3.8, which has no util.urlreq. This was apparently masked by the fact that the Makefile is not set up to run doctests in all modules, which we'll fix in an upcoming change.
author Kevin Bullock <kbullock@ringworld.org>
date Sat, 05 Aug 2017 17:14:44 -0500
parents cfcd3032355c
children e3dab807e38c
files hggit/compat.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/compat.py
+++ b/hggit/compat.py
@@ -30,9 +30,9 @@
 
 def passwordmgr(ui):
     try:
-        return url.passwordmgr(ui,
-                               hgutil.urlreq.httppasswordmgrwithdefaultrealm())
-    except TypeError:
+        realm = hgutil.urlreq.httppasswordmgrwithdefaultrealm()
+        return url.passwordmgr(ui, realm)
+    except (TypeError, AttributeError):
         # compat with hg < 3.9
         return url.passwordmgr(ui)