clean_dms: now works with extension

This commit is contained in:
Celine Mercier
2019-12-12 17:02:50 +01:00
parent d75e54a078
commit fc3ac03630

View File

@ -21,7 +21,10 @@ def run(config):
logger("info", "obi clean_dms")
if obi_clean_dms(tobytes(config['obi']['inputURI'])) < 0 :
dms_path = tobytes(config['obi']['inputURI'])
if b'.obidms' in dms_path:
dms_path = dms_path.split(b'.obidms')[0]
if obi_clean_dms(dms_path) < 0 :
raise Exception("Error cleaning DMS", config['obi']['inputURI'])
logger("info", "Done.")