Bugfix for creation of temporary files
@@ -421,9 +421,7 @@ class _Network:
"""
if not file_path:
- file = tempfile.TemporaryFile(prefix="pylast_tmp_")
- file.close()
- file_path = file.name
+ file_path = tempfile.mkstemp(prefix="pylast_tmp_")
self.cache_backend = _ShelfCacheBackend(file_path)
