comparison mercurial/hgweb/wsgicgi.py @ 7008:8fee8ff13d37

use Exception(args)-style raising consistently (py3k compatibility)
author Peter Ruibal <peter.ruibal@intel.com>
date Mon, 08 Sep 2008 13:07:00 +0200
parents 1ec2d227a521
children ee8af8a4d905
comparison
equal deleted inserted replaced
7007:a6b74fbb5ce0 7008:8fee8ff13d37
51 def start_response(status, response_headers, exc_info=None): 51 def start_response(status, response_headers, exc_info=None):
52 if exc_info: 52 if exc_info:
53 try: 53 try:
54 if headers_sent: 54 if headers_sent:
55 # Re-raise original exception if headers sent 55 # Re-raise original exception if headers sent
56 raise exc_info[0], exc_info[1], exc_info[2] 56 raise exc_info[0](exc_info[1], exc_info[2])
57 finally: 57 finally:
58 exc_info = None # avoid dangling circular ref 58 exc_info = None # avoid dangling circular ref
59 elif headers_set: 59 elif headers_set:
60 raise AssertionError("Headers already set!") 60 raise AssertionError("Headers already set!")
61 61