[SCM] morituri/master: * morituri/program/cdparanoia.py: Log properly again. Properly set exception when we can't rename the file.
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:09:35 UTC 2014
The following commit has been merged in the master branch:
commit 4fdfb7f58cbd2926b0ff6d975cfdbc9b0192caec
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Sun Sep 18 09:18:47 2011 +0000
* morituri/program/cdparanoia.py:
Log properly again.
Properly set exception when we can't rename the file.
diff --git a/ChangeLog b/ChangeLog
index e28eb45..b2dc742 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-09-18 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * morituri/program/cdparanoia.py:
+ Log properly again.
+ Properly set exception when we can't rename the file.
+
2011-09-15 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/extern/task/gstreamer.py:
diff --git a/morituri/program/cdparanoia.py b/morituri/program/cdparanoia.py
index c6f638a..56579b0 100644
--- a/morituri/program/cdparanoia.py
+++ b/morituri/program/cdparanoia.py
@@ -182,7 +182,7 @@ class ProgressParser(object):
# FIXME: handle errors
-class ReadTrackTask(task.Task):
+class ReadTrackTask(log.Loggable, task.Task):
"""
I am a task that reads a track using cdparanoia.
@@ -360,10 +360,13 @@ class ReadTrackTask(task.Task):
self.stop()
return
-class ReadVerifyTrackTask(task.MultiSeparateTask):
+class ReadVerifyTrackTask(log.Loggable, task.MultiSeparateTask):
"""
I am a task that reads and verifies a track using cdparanoia.
+ The path where the file is stored can be changed if necessary, for
+ example if the file name is too long.
+
@ivar path: the path where the file is to be stored.
@ivar checksum: the checksum of the track; set if they match.
@ivar testchecksum: the test checksum of the track.
@@ -473,9 +476,12 @@ class ReadVerifyTrackTask(task.MultiSeparateTask):
os.chmod(self._tmppath, self.file_mode)
try:
+ self.debug('Moving to final path %r', self.path)
shutil.move(self._tmppath, self.path)
except Exception, e:
- self._exception = e
+ self.debug('Exception while moving to final path %r: %r',
+ self.path, log.getExceptionMessage(e))
+ self.exception = e
else:
self.debug('stop: exception %r', self.exception)
except Exception, e:
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list