Mercurial > cpython-lru_cache-weakref
diff Lib/ftplib.py @ 20500:fddacefeeb36 legacy-trunk
Oops. Catching OverflowError from int() doesn't help, since it raises
ValueError on too-large inputs.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 17 Oct 2001 17:21:47 +0000 |
| parents | 7e71eebab4ea |
| children | c48d8b362ace |
line wrap: on
line diff
--- a/Lib/ftplib.py Wed Oct 17 13:59:09 2001 +0000 +++ b/Lib/ftplib.py Wed Oct 17 17:21:47 2001 +0000 @@ -508,7 +508,7 @@ s = resp[3:].strip() try: return int(s) - except OverflowError: + except (OverflowError, ValueError): return long(s) def mkd(self, dirname): @@ -558,7 +558,7 @@ s = m.group(1) try: return int(s) - except OverflowError: + except (OverflowError, ValueError): return long(s)
