mirror of https://github.com/python/cpython
Oops. Catching OverflowError from int() doesn't help, since it raises
ValueError on too-large inputs.
This commit is contained in:
parent
14a6f8378e
commit
1f74cb3575
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue