more pythonic

This commit is contained in:
Barış Metin
2005-07-05 13:09:47 +00:00
parent e02f78d3db
commit ed5ce784d4
+1 -1
View File
@@ -128,7 +128,7 @@ class Fetcher:
except HTTPException, e: except HTTPException, e:
self.err(('(%s): %s') % (e.__class__.__name__, e)) self.err(('(%s): %s') % (e.__class__.__name__, e))
if not headers is None and not headers.has_key('Content-Length'): if headers and not headers.has_key('Content-Length'):
totalsize = 0 # could not get the totalsize of file totalsize = 0 # could not get the totalsize of file
else: totalsize = int(headers['Content-Length']) else: totalsize = int(headers['Content-Length'])