summaryrefslogtreecommitdiff
path: root/paste/wsgilib.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-03-19 12:51:48 +0100
committerVictor Stinner <victor.stinner@gmail.com>2014-03-19 12:51:48 +0100
commit4c177fce89fee925f0f4fbfde00ce2e1252562c0 (patch)
tree3e7a8a8f9771aeb649449b390d1ba5038cc32059 /paste/wsgilib.py
parent4450e264ae1d68e0150e0ab9f611118d9797d694 (diff)
downloadpaste-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.py17
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):
"""