summaryrefslogtreecommitdiff
path: root/Lib/ftplib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/ftplib.py')
-rw-r--r--Lib/ftplib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
index 8d8d51fa82..592f5d29d2 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)