Mercurial > hg
comparison mercurial/hgweb/wsgicgi.py @ 14956:1b3f5f603aef
wsgicgi: use getattr instead of hasattr
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 25 Jul 2011 15:38:10 -0500 |
parents | 659f34b833b9 |
children | e7cfe3587ea4 |
comparison
equal
deleted
inserted
replaced
14955:6349a9eb0178 | 14956:1b3f5f603aef |
---|---|
76 content = application(environ, start_response) | 76 content = application(environ, start_response) |
77 try: | 77 try: |
78 for chunk in content: | 78 for chunk in content: |
79 write(chunk) | 79 write(chunk) |
80 finally: | 80 finally: |
81 if hasattr(content, 'close'): | 81 getattr(content, 'close', lambda : None)() |
82 content.close() |