DB config
This commit is contained in:
parent
562fabae1e
commit
0f2763acd2
@ -30,6 +30,8 @@ def main():
|
||||
if filename.endswith(ext):
|
||||
processFIT(filename)
|
||||
deleteFiles(filename)
|
||||
else:
|
||||
os.remove(os.path.join(path, filename))
|
||||
|
||||
pass
|
||||
|
||||
@ -129,11 +131,7 @@ def writeDB():
|
||||
|
||||
def deleteFiles(filename):
|
||||
try:
|
||||
for fname in os.listdir(path):
|
||||
print("sehe file:", fname)
|
||||
if fname.startswith(filename[:-4]):
|
||||
os.remove(os.path.join(path, fname))
|
||||
print("lösche", fname)
|
||||
os.remove(os.path.join(path, filename))
|
||||
except Exception as e:
|
||||
print('Failed to delete %s. Reason: %s' % (path+filename, e))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user