daca2: tried to improve getpackages to be more robust

This commit is contained in:
Daniel Marjamäki 2013-10-20 11:25:31 +02:00
parent 4debaa2b92
commit 17f8edfada
1 changed files with 4 additions and 4 deletions

View File

@ -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)