Absubmit close temporary file

Fix error when deleting the file under Windows
This commit is contained in:
inytar 2017-01-02 14:05:59 -05:00
parent 0975ee709b
commit a5aee3f677

View file

@ -131,6 +131,7 @@ class AcousticBrainzSubmitPlugin(plugins.BeetsPlugin):
tmp_file, filename = tempfile.mkstemp(suffix='.json') tmp_file, filename = tempfile.mkstemp(suffix='.json')
try: try:
# Close the file, so the extractor can overwrite it. # Close the file, so the extractor can overwrite it.
os.close(tmp_file)
try: try:
call([self.extractor, util.syspath(item.path), filename]) call([self.extractor, util.syspath(item.path), filename])
except ABSubmitError as e: except ABSubmitError as e: