improvement for qwknetftpc

This commit is contained in:
Andrew Pamment 2018-10-31 09:21:49 +10:00
parent a4d3f30f8b
commit 8a6348f5b1

View File

@ -1,5 +1,5 @@
from ftplib import FTP
from ftplib import error_perm
from ftplib import all_errors
import configparser
import os
import sys
@ -35,13 +35,11 @@ def dostuff(config_file):
ftp.retrbinary("RETR " + config.get("Main", "Host") + ".QWK", callback)
file.close()
print("RETREIVED: " + config.get("Main", "Host") + ".QWK")
except error_perm:
except all_errors:
file.close()
os.remove(qwkfile)
if __name__ == "__main__":
if len(sys.argv) < 2: