summaryrefslogtreecommitdiff
path: root/paste/wsgiwrappers.py
diff options
context:
space:
mode:
authorCyril Roelandt <cyril.roelandt@enovance.com>2014-03-18 12:49:40 +0100
committerCyril Roelandt <cyril.roelandt@enovance.com>2014-03-18 12:49:40 +0100
commit9b529a23f64c4b27c427a2680428f3e17531e9c3 (patch)
tree6647b5b6639201d2a18767b6fa4c3f73a36be61b /paste/wsgiwrappers.py
parent52ecfe48860ed04a80532fd7a01b51fbed9c7217 (diff)
downloadpaste-9b529a23f64c4b27c427a2680428f3e17531e9c3.tar.gz
Python 3: use new style of raise, replace "raise class, args" with "raise class(args)"
Diffstat (limited to 'paste/wsgiwrappers.py')
-rw-r--r--paste/wsgiwrappers.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/paste/wsgiwrappers.py b/paste/wsgiwrappers.py
index 7074923..9b614ec 100644
--- a/paste/wsgiwrappers.py
+++ b/paste/wsgiwrappers.py
@@ -451,8 +451,8 @@ class WSGIResponse(object):
# See http://docs.python.org/lib/bltin-file-objects.html
def write(self, content):
if not self._is_str_iter:
- raise IOError, "This %s instance's content is not writable: (content " \
- 'is an iterator)' % self.__class__.__name__
+ raise IOError("This %s instance's content is not writable: (content "
+ 'is an iterator)' % self.__class__.__name__)
self.content.append(content)
def flush(self):
@@ -460,8 +460,8 @@ class WSGIResponse(object):
def tell(self):
if not self._is_str_iter:
- raise IOError, 'This %s instance cannot tell its position: (content ' \
- 'is an iterator)' % self.__class__.__name__
+ raise IOError('This %s instance cannot tell its position: (content '
+ 'is an iterator)' % self.__class__.__name__)
return sum([len(chunk) for chunk in self._iter])
########################################