Mercurial > hg
diff mercurial/url.py @ 10534:a957038218cd stable
url: avoid traceback when parsing [auth] (issue2056)
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Tue, 23 Feb 2010 22:31:54 +0100 |
parents | 6f61c480f51c |
children | fc5908d01ed7 |
line wrap: on
line diff
--- a/mercurial/url.py Tue Feb 23 23:19:09 2010 +0100 +++ b/mercurial/url.py Tue Feb 23 22:31:54 2010 +0100 @@ -140,6 +140,9 @@ # Read configuration config = dict() for key, val in self.ui.configitems('auth'): + if '.' not in key: + self.ui.warn(_("ignoring invalid [auth] key '%s'\n" % key)) + continue group, setting = key.split('.', 1) gdict = config.setdefault(group, dict()) gdict[setting] = val