diff --git a/python/obitools3/commands/align.pyx b/python/obitools3/commands/align.pyx index bedc7db..68c4ed9 100644 --- a/python/obitools3/commands/align.pyx +++ b/python/obitools3/commands/align.pyx @@ -266,9 +266,9 @@ def run(config): # If the input and the output DMS are different, delete the temporary result view in the input DMS if i_dms != o_dms: View.delete_view(i_dms, o_view_name) - o_dms.close() + o_dms.close(force=True) - i_dms.close() + i_dms.close(force=True) logger("info", "Done.") \ No newline at end of file diff --git a/python/obitools3/commands/alignpairedend.pyx b/python/obitools3/commands/alignpairedend.pyx index 2a0699b..50d679b 100755 --- a/python/obitools3/commands/alignpairedend.pyx +++ b/python/obitools3/commands/alignpairedend.pyx @@ -247,10 +247,10 @@ def run(config): #print("\n\nOutput view:\n````````````", file=sys.stderr) #print(repr(view), file=sys.stderr) - input[0].close() + input[0].close(force=True) if two_views: - rinput[0].close() - output[0].close() + rinput[0].close(force=True) + output[0].close(force=True) logger("info", "Done.") \ No newline at end of file diff --git a/python/obitools3/commands/annotate.pyx b/python/obitools3/commands/annotate.pyx index ba7c75e..ce66391 100755 --- a/python/obitools3/commands/annotate.pyx +++ b/python/obitools3/commands/annotate.pyx @@ -379,7 +379,7 @@ def run(config): # If the input and the output DMS are different, delete the temporary imported view used to create the final view if i_dms != o_dms: View.delete_view(o_dms, imported_view_name) - o_dms.close() - i_dms.close() + o_dms.close(force=True) + i_dms.close(force=True) logger("info", "Done.") diff --git a/python/obitools3/commands/build_ref_db.pyx b/python/obitools3/commands/build_ref_db.pyx index 77f2f69..ad8e5bc 100755 --- a/python/obitools3/commands/build_ref_db.pyx +++ b/python/obitools3/commands/build_ref_db.pyx @@ -97,9 +97,9 @@ def run(config): # If the input and the output DMS are different, delete the temporary result view in the input DMS if i_dms != o_dms: View.delete_view(i_dms, o_view_name) - o_dms.close() + o_dms.close(force=True) - i_dms.close() + i_dms.close(force=True) logger("info", "Done.") diff --git a/python/obitools3/commands/cat.pyx b/python/obitools3/commands/cat.pyx index 6797edd..803158f 100755 --- a/python/obitools3/commands/cat.pyx +++ b/python/obitools3/commands/cat.pyx @@ -133,7 +133,7 @@ def run(config): #print(repr(view), file=sys.stderr) for d in idms_list: - d.close() - o_dms.close() + d.close(force=True) + o_dms.close(force=True) logger("info", "Done.") diff --git a/python/obitools3/commands/clean.pyx b/python/obitools3/commands/clean.pyx index 6cd5ede..b4848fd 100755 --- a/python/obitools3/commands/clean.pyx +++ b/python/obitools3/commands/clean.pyx @@ -124,8 +124,8 @@ def run(config): # If the input and the output DMS are different, delete the temporary result view in the input DMS if i_dms != o_dms: View.delete_view(i_dms, o_view_name) - o_dms.close() + o_dms.close(force=True) - i_dms.close() + i_dms.close(force=True) logger("info", "Done.") \ No newline at end of file diff --git a/python/obitools3/commands/count.pyx b/python/obitools3/commands/count.pyx index 9713d67..9c84380 100755 --- a/python/obitools3/commands/count.pyx +++ b/python/obitools3/commands/count.pyx @@ -56,3 +56,5 @@ def run(config): print(count2) else: print(count1) + + input[0].close(force=True) diff --git a/python/obitools3/commands/export.pyx b/python/obitools3/commands/export.pyx index 71ec36a..4d3bca8 100755 --- a/python/obitools3/commands/export.pyx +++ b/python/obitools3/commands/export.pyx @@ -86,7 +86,7 @@ def run(config): if not BrokenPipeError and not IOError: output_object.close() iview.close() - input[0].close() + input[0].close(force=True) logger("info", "Done.") diff --git a/python/obitools3/commands/grep.pyx b/python/obitools3/commands/grep.pyx index ab366c7..357a690 100644 --- a/python/obitools3/commands/grep.pyx +++ b/python/obitools3/commands/grep.pyx @@ -370,7 +370,7 @@ def run(config): # If the input and the output DMS are different, delete the temporary imported view used to create the final view if i_dms != o_dms: View.delete_view(i_dms, o_view_name) - o_dms.close() - i_dms.close() + o_dms.close(force=True) + i_dms.close(force=True) logger("info", "Done.") diff --git a/python/obitools3/commands/head.pyx b/python/obitools3/commands/head.pyx index e588943..4ac2231 100755 --- a/python/obitools3/commands/head.pyx +++ b/python/obitools3/commands/head.pyx @@ -103,7 +103,7 @@ def run(config): # If the input and the output DMS are different, delete the temporary imported view used to create the final view if i_dms != o_dms: View.delete_view(i_dms, o_view_name) - o_dms.close() - i_dms.close() + o_dms.close(force=True) + i_dms.close(force=True) logger("info", "Done.") diff --git a/python/obitools3/commands/history.pyx b/python/obitools3/commands/history.pyx index e3edab6..aff00e7 100755 --- a/python/obitools3/commands/history.pyx +++ b/python/obitools3/commands/history.pyx @@ -54,4 +54,5 @@ def run(config): print(bytes2str(entries.ascii_history)) else: raise Exception("ASCII history only available for views") - + + input[0].close(force=True) diff --git a/python/obitools3/commands/less.pyx b/python/obitools3/commands/less.pyx index 5394d36..4fc0917 100755 --- a/python/obitools3/commands/less.pyx +++ b/python/obitools3/commands/less.pyx @@ -46,5 +46,5 @@ def run(config): process.wait() iview.close() - input[0].close() + input[0].close(force=True) diff --git a/python/obitools3/commands/ls.pyx b/python/obitools3/commands/ls.pyx index a103bda..62b98dd 100755 --- a/python/obitools3/commands/ls.pyx +++ b/python/obitools3/commands/ls.pyx @@ -36,6 +36,7 @@ def run(config): l = [] for view in input[0]: l.append(tostr(view) + "\t(Date created: " + str(bytes2str_object(dms[view].comments["Date created"]))+")") + dms[view].close() l.sort() for v in l: print(v) @@ -51,4 +52,5 @@ def run(config): if config['ls']['longformat'] and len(input[1].comments) > 0: print("\n### Comments:") print(str(input[1].comments)) - + + input[0].close(force=True) diff --git a/python/obitools3/commands/sort.pyx b/python/obitools3/commands/sort.pyx index 0577c38..ff0929e 100755 --- a/python/obitools3/commands/sort.pyx +++ b/python/obitools3/commands/sort.pyx @@ -141,7 +141,7 @@ def run(config): # If the input and the output DMS are different, delete the temporary imported view used to create the final view if i_dms != o_dms: View.delete_view(i_dms, o_view_name) - o_dms.close() - i_dms.close() + o_dms.close(force=True) + i_dms.close(force=True) logger("info", "Done.") diff --git a/python/obitools3/commands/tail.pyx b/python/obitools3/commands/tail.pyx index 26d9d84..aa9fd95 100755 --- a/python/obitools3/commands/tail.pyx +++ b/python/obitools3/commands/tail.pyx @@ -106,7 +106,7 @@ def run(config): # If the input and the output DMS are different, delete the temporary imported view used to create the final view if i_dms != o_dms: View.delete_view(i_dms, o_view_name) - o_dms.close() - i_dms.close() + o_dms.close(force=True) + i_dms.close(force=True) logger("info", "Done.") diff --git a/python/obitools3/commands/test.pyx b/python/obitools3/commands/test.pyx index aa23c32..a0cd1a5 100755 --- a/python/obitools3/commands/test.pyx +++ b/python/obitools3/commands/test.pyx @@ -529,7 +529,7 @@ def run(config): test_taxo(config, infos) infos['view'].close() - infos['dms'].close() + infos['dms'].close(force=True) shutil.rmtree(config['obi']['defaultdms']+'.obidms', ignore_errors=True) print("Done.")