From 17f8edfada5627098c260bf1a77aedff8139721c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 20 Oct 2013 11:25:31 +0200 Subject: [PATCH] daca2: tried to improve getpackages to be more robust --- tools/daca2.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/daca2.py b/tools/daca2.py index df34f2cc2..1692b45ac 100644 --- a/tools/daca2.py +++ b/tools/daca2.py @@ -49,17 +49,17 @@ def getpackages(folder): except socket.error as err: print(str(err)) - except ftplib.error_temp: + except ftplib.error_temp as err: print(str(err)) - except EOFError: + except EOFError as err: print(str(err)) if not filename: print('Retry..') f.close() - f.quit() - f.login() time.sleep(1) + f = ftplib.FTP(FTPSERVER) + f.login() count = count - 1 else: archives.append(package + '/' + filename)