From a5aee3f677acf33dcea4825e3971fd7c422edcec Mon Sep 17 00:00:00 2001 From: inytar Date: Mon, 2 Jan 2017 14:05:59 -0500 Subject: [PATCH] Absubmit close temporary file Fix error when deleting the file under Windows --- beetsplug/absubmit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/beetsplug/absubmit.py b/beetsplug/absubmit.py index 95f3342ac..646f0fb84 100644 --- a/beetsplug/absubmit.py +++ b/beetsplug/absubmit.py @@ -131,6 +131,7 @@ class AcousticBrainzSubmitPlugin(plugins.BeetsPlugin): tmp_file, filename = tempfile.mkstemp(suffix='.json') try: # Close the file, so the extractor can overwrite it. + os.close(tmp_file) try: call([self.extractor, util.syspath(item.path), filename]) except ABSubmitError as e: