gzip.GzipFile may not exist as a parent class
This commit is contained in:
Kristján Valur Jónsson 2009-07-19 22:35:44 +00:00
parent 6d755900f6
commit c0379437fc
1 changed files with 1 additions and 1 deletions

View File

@ -1192,7 +1192,7 @@ def gzip_decode(data):
# @param response A stream supporting a read() method
# @return a file-like object that the decoded data can be read() from
class GzipDecodedResponse(gzip.GzipFile):
class GzipDecodedResponse(gzip.GzipFile if gzip else object):
"""a file-like object to decode a response encoded with the gzip
method, as described in RFC 1952.
"""