mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
httprepo: use getattr instead of hasattr
This commit is contained in:
parent
43844331a5
commit
b61457dbf9
@ -44,8 +44,7 @@ class httprepository(wireproto.wirerepository):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user