improvement for qwknetftpc
This commit is contained in:
parent
a4d3f30f8b
commit
8a6348f5b1
@ -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:
|
||||
|
Reference in New Issue
Block a user