diff options
author | ianb <devnull@localhost> | 2008-08-11 16:15:41 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2008-08-11 16:15:41 +0000 |
commit | 4e009ba68f8acdcdb998c1d9fb619c8b1f0bf96e (patch) | |
tree | 23f1fe7da10aec0d5638164416ef2bbc2d305be9 /paste | |
parent | 349beb2177f91b18faf53b71f2f0d33dd4725ec8 (diff) | |
download | paste-4e009ba68f8acdcdb998c1d9fb619c8b1f0bf96e.tar.gz |
make seek method conditional
Diffstat (limited to 'paste')
-rwxr-xr-x | paste/httpserver.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/paste/httpserver.py b/paste/httpserver.py index a4617ff..5ca5956 100755 --- a/paste/httpserver.py +++ b/paste/httpserver.py @@ -449,6 +449,8 @@ class LimitedLengthFile(object): self.file = file self.length = length self._consumed = 0 + if hasattr(self.file, 'seek'): + self.seek = self._seek def __repr__(self): base_repr = repr(self.file) @@ -491,7 +493,7 @@ class LimitedLengthFile(object): ## Optional methods ## - def seek(self, place): + def _seek(self, place): self.file.seek(place) self._consumed = place |