D5734: url: add some defensive asserts on expected incoming types
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Tue Jan 29 16:48:11 EST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGbc776c31c093: url: add some defensive asserts on expected incoming types (authored by durin42, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5734?vs=13549&id=13556
REVISION DETAIL
https://phab.mercurial-scm.org/D5734
AFFECTED FILES
mercurial/url.py
CHANGE DETAILS
diff --git a/mercurial/url.py b/mercurial/url.py
--- a/mercurial/url.py
+++ b/mercurial/url.py
@@ -58,6 +58,8 @@
return self.passwddb.add_password(realm, uri, user, passwd)
def find_user_password(self, realm, authuri):
+ assert isinstance(realm, (type(None), str))
+ assert isinstance(authuri, str)
authinfo = self.passwddb.find_user_password(realm, authuri)
user, passwd = authinfo
if user and passwd:
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list