diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-03-19 12:51:48 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-03-19 12:51:48 +0100 |
commit | 4c177fce89fee925f0f4fbfde00ce2e1252562c0 (patch) | |
tree | 3e7a8a8f9771aeb649449b390d1ba5038cc32059 /paste/wsgilib.py | |
parent | 4450e264ae1d68e0150e0ab9f611118d9797d694 (diff) | |
download | paste-4c177fce89fee925f0f4fbfde00ce2e1252562c0.tar.gz |
Python 3: fix more submodules
* print syntax
* replace "except Exception, exc:" with "except Exception as exc:"
Diffstat (limited to 'paste/wsgilib.py')
-rw-r--r-- | paste/wsgilib.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/paste/wsgilib.py b/paste/wsgilib.py index 879a43e..1234ef9 100644 --- a/paste/wsgilib.py +++ b/paste/wsgilib.py @@ -5,6 +5,8 @@ A module of many disparate routines. """ +from __future__ import print_function + # functions which moved to paste.request and paste.response # Deprecated around 15 Dec 2005 from paste.request import get_cookies, parse_querystring, parse_formvars @@ -53,10 +55,9 @@ class add_close(object): def __del__(self): if not self._closed: # We can't raise an error or anything at this stage - print >> sys.stderr, ( - "Error: app_iter.close() was not called when finishing " + print("Error: app_iter.close() was not called when finishing " "WSGI request. finalization function %s not called" - % self.close_func) + % self.close_func, file=sys.stderr) class add_start_close(object): """ @@ -92,10 +93,9 @@ class add_start_close(object): def __del__(self): if not self._closed: # We can't raise an error or anything at this stage - print >> sys.stderr, ( - "Error: app_iter.close() was not called when finishing " + print("Error: app_iter.close() was not called when finishing " "WSGI request. finalization function %s not called" - % self.close_func) + % self.close_func, file=sys.stderr) class chained_app_iters(object): @@ -137,10 +137,9 @@ class chained_app_iters(object): def __del__(self): if not self._closed: # We can't raise an error or anything at this stage - print >> sys.stderr, ( - "Error: app_iter.close() was not called when finishing " + print("Error: app_iter.close() was not called when finishing " "WSGI request. finalization function %s not called" - % self.close_func) + % self.close_func, file=sys.stderr) class encode_unicode_app_iter(object): """ |