* morituri/common/common.py:

Add MissingDependencyException.
	* morituri/program/cdrdao.py:
	* morituri/rip/main.py:
	  Use it to warn about missing cdrdao.
This commit is contained in:
Thomas Vander Stichele
2010-06-18 22:02:53 +00:00
parent babf47ec1d
commit 0c5e13ce0f
4 changed files with 34 additions and 5 deletions

View File

@@ -250,10 +250,18 @@ class CDRDAOTask(task.Task):
task.Task.start(self, runner)
bufsize = 1024
self._popen = asyncsub.Popen(["cdrdao", ] + self.options,
bufsize=bufsize,
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, close_fds=True)
try:
self._popen = asyncsub.Popen(["cdrdao", ] + self.options,
bufsize=bufsize,
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, close_fds=True)
except OSError, e:
import errno
if e.errno == errno.ENOENT:
raise common.MissingDependencyException('cdrdao')
raise
self.debug('Started cdrdao with pid %d and options %r',
self._popen.pid, self.options)