Replacing deprecated has_key() with operator in (PEP8)

This commit is contained in:
Miroslav Stampar
2013-01-03 23:28:07 +01:00
parent e4a3c015e5
commit 1712603dce
5 changed files with 7 additions and 7 deletions

View File

@@ -92,7 +92,7 @@ def main():
req = urllib2.Request(sqlfile)
response = urllib2.urlopen(req)
if response.headers.has_key("Content-Length"):
if "Content-Length" in response.headers:
if int(response.headers.get("Content-Length")) > MAX_FILE_SIZE:
continue