[SCM] morituri/master: * morituri/common/common.py: Don't fail on loading pickle.
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:09:22 UTC 2014
The following commit has been merged in the master branch:
commit 019ad538d89ba4576021c9fe0da1d3efa3066f4f
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Thu May 19 10:03:30 2011 +0000
* morituri/common/common.py:
Don't fail on loading pickle.
diff --git a/ChangeLog b/ChangeLog
index eca5bc3..5437466 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2011-05-19 Thomas Vander Stichele <thomas at apestaart dot org>
+ * morituri/common/common.py:
+ Don't fail on loading pickle.
+
+2011-05-19 Thomas Vander Stichele <thomas at apestaart dot org>
+
* morituri/common/encode.py:
Alac does not have merge_tags. Fixes #15.
diff --git a/morituri/common/common.py b/morituri/common/common.py
index a223648..4f221d6 100644
--- a/morituri/common/common.py
+++ b/morituri/common/common.py
@@ -144,7 +144,13 @@ class Persister(object):
handle = open(self._path)
import pickle
- self.object = pickle.load(handle)
+
+ try:
+ self.object = pickle.load(handle)
+ except:
+ # can fail for various reasons; in that case, pretend we didn't
+ # load it
+ pass
def delete(self):
self.object = None
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list