Show More
@@ -393,7 +393,7 b' class HTTPResponse(httplib.HTTPResponse)' | |||
|
393 | 393 | def read(self, amt=None): |
|
394 | 394 | # the _rbuf test is only in this first if for speed. It's not |
|
395 | 395 | # logically necessary |
|
396 |
if self._rbuf and |
|
|
396 | if self._rbuf and amt is not None: | |
|
397 | 397 | L = len(self._rbuf) |
|
398 | 398 | if amt > L: |
|
399 | 399 | amt -= L |
@@ -80,7 +80,7 b' class IndexObject(BaseIndexObject):' | |||
|
80 | 80 | return i * indexsize |
|
81 | 81 | |
|
82 | 82 | def __delitem__(self, i): |
|
83 |
if not isinstance(i, slice) or not i.stop == -1 or |
|
|
83 | if not isinstance(i, slice) or not i.stop == -1 or i.step is not None: | |
|
84 | 84 | raise ValueError("deleting slices only supports a:-1 with step 1") |
|
85 | 85 | i = self._fix_index(i.start) |
|
86 | 86 | if i < self._lgt: |
@@ -114,7 +114,7 b' class InlinedIndexObject(BaseIndexObject' | |||
|
114 | 114 | return count |
|
115 | 115 | |
|
116 | 116 | def __delitem__(self, i): |
|
117 |
if not isinstance(i, slice) or not i.stop == -1 or |
|
|
117 | if not isinstance(i, slice) or not i.stop == -1 or i.step is not None: | |
|
118 | 118 | raise ValueError("deleting slices only supports a:-1 with step 1") |
|
119 | 119 | i = self._fix_index(i.start) |
|
120 | 120 | if i < self._lgt: |
General Comments 0
You need to be logged in to leave comments.
Login now