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

ValueError on too-large inputs.
This commit is contained in:
Guido van Rossum 2001-10-17 17:21:47 +00:00
parent 14a6f8378e
commit 1f74cb3575
1 changed files with 2 additions and 2 deletions

View File

@ -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)