From 9fb4264934aa0bebd3cc20bb6a6f1e440334af28 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Thu, 7 May 2009 09:11:23 +0000 Subject: [PATCH] * morituri/common/common.py: Set the object when we don't persist. * examples/readdisc.py: Small fixes. --- ChangeLog | 7 +++++++ examples/readdisc.py | 4 ++-- morituri/common/common.py | 4 ++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 859bc6f..81ebce5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-05-07 Thomas Vander Stichele + + * morituri/common/common.py: + Set the object when we don't persist. + * examples/readdisc.py: + Small fixes. + 2009-05-06 Thomas Vander Stichele * examples/readdisc.py: diff --git a/examples/readdisc.py b/examples/readdisc.py index 777fb18..422d70b 100644 --- a/examples/readdisc.py +++ b/examples/readdisc.py @@ -93,7 +93,7 @@ def musicbrainz(discid): # No disc matching this DiscID has been found. if len(results) == 0: print "Disc is not yet in the MusicBrainz database." - print "Consider adding it via", mbdisc.getSubmissionUrl(disc) + print "Consider adding it." return @@ -201,7 +201,7 @@ def main(argv): metadata.tracks[i].title) # FIXME: optionally allow overriding reripping if not os.path.exists(path): - print 'Ripping track %d' % (i + 1) + print 'Ripping track %d: %s' % (i + 1, os.path.basename(path)) t = cdparanoia.ReadVerifyTrackTask(path, ittoc, ittoc.getTrackStart(i + 1), ittoc.getTrackEnd(i + 1), offset=int(options.offset)) diff --git a/morituri/common/common.py b/morituri/common/common.py index f3c0106..75f3971 100644 --- a/morituri/common/common.py +++ b/morituri/common/common.py @@ -97,6 +97,10 @@ class Persister(object): if object and object == self.object: return + # store the object on ourselves if not None + if object is not None: + self.object = object + # don't pickle if there is no path if not self._path: return