Mercurial > hg
changeset 14955:6349a9eb0178
httprepo: use getattr instead of hasattr
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 25 Jul 2011 15:37:52 -0500 |
parents | ce7e3014fda7 |
children | 1b3f5f603aef |
files | mercurial/httprepo.py |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/httprepo.py Mon Jul 25 15:36:13 2011 -0500 +++ b/mercurial/httprepo.py Mon Jul 25 15:37:52 2011 -0500 @@ -44,8 +44,7 @@ def __del__(self): for h in self.urlopener.handlers: h.close() - if hasattr(h, "close_all"): - h.close_all() + getattr(h, "close_all", lambda : None)() def url(self): return self.path