diff --git a/python/obitools3/commands/clean_dms.pyx b/python/obitools3/commands/clean_dms.pyx index 4d4eb4a..94d5bb5 100755 --- a/python/obitools3/commands/clean_dms.pyx +++ b/python/obitools3/commands/clean_dms.pyx @@ -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.")