diff options
author | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-18 12:49:40 +0100 |
---|---|---|
committer | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-18 12:49:40 +0100 |
commit | 9b529a23f64c4b27c427a2680428f3e17531e9c3 (patch) | |
tree | 6647b5b6639201d2a18767b6fa4c3f73a36be61b /paste/wsgiwrappers.py | |
parent | 52ecfe48860ed04a80532fd7a01b51fbed9c7217 (diff) | |
download | paste-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.py | 8 |
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]) ######################################## |