diff options
author | Guido van Rossum <guido@python.org> | 2001-10-17 17:21:47 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-10-17 17:21:47 (GMT) |
commit | 1f74cb3575a51879bc7a011757958607d18e0bce (patch) | |
tree | fbe68d1900adf147ecbec586f0220f5991f727b7 | |
parent | 14a6f8378e3b2a00e0cfd0a3853cddaaf56af727 (diff) | |
download | cpython-1f74cb3575a51879bc7a011757958607d18e0bce.zip cpython-1f74cb3575a51879bc7a011757958607d18e0bce.tar.gz cpython-1f74cb3575a51879bc7a011757958607d18e0bce.tar.bz2 |
Oops. Catching OverflowError from int() doesn't help, since it raises
ValueError on too-large inputs.
-rw-r--r-- | Lib/ftplib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py index 8d8d51f..592f5d2 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -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) |