I'm using django (which support py23) it in a RHEL 4 and cannot upgrade python. Path follows:
--- firepython\middleware.py Tue May 12 10:12:32 2009 UTC
+++ firepython\middleware.py Tue Jun 16 22:06:02 2009 UTC
@@ -146,7 +146,7 @@
errors.append(self._handle_internal_exception(e))
chunks = self._encode(logs, errors, profile)
- guid = "%08x" % random.randint(0,0xFFFFFFFFL)
+ guid = "%08x" % random.randint(0,0xFFFFFFFF)
for i, chunk in enumerate(chunks):
add_header('FireLogger-%s-%d' % (guid, i), chunk)
@@ -356,17 +356,16 @@
self._start()
# run app
try:
- try:
- app = self._profile_wrap(self._app)
- app_iter = app(environ, faked_start_response)
- output = list(app_iter)
- except Exception:
- logging.exception(sys.exc_info()[1])
- raise
- except:
- logging.warning("DeprecationWarning: raising a string exception is deprecated")
- logging.exception(sys.exc_info()[0])
- raise
+ app = self._profile_wrap(self._app)
+ app_iter = app(environ, faked_start_response)
+ output = list(app_iter)
+ except Exception:
+ logging.exception(sys.exc_info()[1])
+ raise
+ except:
+ logging.warning("DeprecationWarning: raising a string exception is deprecated")
+ logging.exception(sys.exc_info()[0])
+ raise
finally:
# Output the profile first, so we can see any errors in profiling.
profile = self._prepare_profile()