changeset 14956:1b3f5f603aef

wsgicgi: use getattr instead of hasattr
author Augie Fackler <durin42@gmail.com>
date Mon, 25 Jul 2011 15:38:10 -0500
parents 6349a9eb0178
children 16e5271b216f
files mercurial/hgweb/wsgicgi.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/wsgicgi.py	Mon Jul 25 15:37:52 2011 -0500
+++ b/mercurial/hgweb/wsgicgi.py	Mon Jul 25 15:38:10 2011 -0500
@@ -78,5 +78,4 @@
         for chunk in content:
             write(chunk)
     finally:
-        if hasattr(content, 'close'):
-            content.close()
+        getattr(content, 'close', lambda : None)()