spostata l'eliminazione dei vecchi file in un altro try

This commit is contained in:
2019-10-30 16:59:05 +01:00
parent 4f05729782
commit 8ec7e5e835

View File

@@ -15,8 +15,6 @@ from pprint import pprint
from glob import glob
from copy import deepcopy
from slugify import slugify
####### VAR GLOBALI #######
####### FUNZIONI GLOBALI #######
@@ -111,14 +109,18 @@ try:
else:
print('Non ho capito la risposta, sii un po\' piu\' specifico... [y/n]\n')
pass
except:
print(Fore.LIGHTRED_EX, 'OOPS! Qualcosa e\' andato storto, non riesco a trovare nessun file da leggere :(', Style.RESET_ALL)
input()
sys.exit()
try:
if settings['removeOldFiles']:
print("Rimuovo i vecchi file dalla cartella di destinazione..")
for x in glob(cfg['OUTworkPath']+'*.txt'):
os.remove(x)
except:
print(Fore.LIGHTRED_EX, 'OOPS! Qualcosa e\' andato storto, non riesco a trovare nessun file da leggere :(', Style.RESET_ALL)
input()
sys.exit()
print(Fore.LIGHTRED_EX, 'OOPS! Qualcosa e\' andato storto, non riesco a rimuovere i vecchi file :(', Style.RESET_ALL)
lastTime=time.time()
fileCounter = 1