diff --git a/src/pylast/__init__.py b/src/pylast/__init__.py index 1a24622..af426e2 100644 --- a/src/pylast/__init__.py +++ b/src/pylast/__init__.py @@ -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)