Browse Source

Prevent ResourceWarning

pull/189/head
Oliverpool 9 years ago
parent
commit
713241a3c1
  1. 3
      patacrep/songs/__init__.py

3
patacrep/songs/__init__.py

@ -194,9 +194,10 @@ class Song:
# https://bugs.python.org/issue1692335
return
cached = {attr: getattr(self, attr) for attr in self.cached_attributes}
with open(self.cached_name, 'wb') as cache_file:
pickle.dump(
cached,
open(self.cached_name, 'wb'),
cache_file,
protocol=-1
)

Loading…
Cancel
Save