Kaydet (Commit) 1f74cb35 authored tarafından Guido van Rossum's avatar Guido van Rossum

Oops. Catching OverflowError from int() doesn't help, since it raises

ValueError on too-large inputs.
üst 14a6f837
......@@ -508,7 +508,7 @@ class FTP:
s = resp[3:].strip()
try:
return int(s)
except OverflowError:
except (OverflowError, ValueError):
return long(s)
def mkd(self, dirname):
......@@ -558,7 +558,7 @@ def parse150(resp):
s = m.group(1)
try:
return int(s)
except OverflowError:
except (OverflowError, ValueError):
return long(s)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment