summaryrefslogtreecommitdiff
path: root/paste/httpserver.py
diff options
context:
space:
mode:
authorianb <devnull@localhost>2008-08-11 16:15:41 +0000
committerianb <devnull@localhost>2008-08-11 16:15:41 +0000
commit4e009ba68f8acdcdb998c1d9fb619c8b1f0bf96e (patch)
tree23f1fe7da10aec0d5638164416ef2bbc2d305be9 /paste/httpserver.py
parent349beb2177f91b18faf53b71f2f0d33dd4725ec8 (diff)
downloadpaste-4e009ba68f8acdcdb998c1d9fb619c8b1f0bf96e.tar.gz
make seek method conditional
Diffstat (limited to 'paste/httpserver.py')
-rwxr-xr-xpaste/httpserver.py4
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