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