Version 0.3.2
Bug fixes:
 Really fix the third party module test bug.

--
sim

file:03382f66352b1a6df13810c751b4ca25793e2245 -> file:bf79b4c4d44a057321ea4cc52a77103b7172ca42
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+mp3togo (0.3.2) unstable; urgency=low
+
+ * Really be graceful in the absence of third party modules.
+ Thanks fab for the patch.
+
+ -- Simeon Veldstra <reallifesim@gmail.com> Wed, 17 May 2006 12:32:00 -0700
+
mp3togo (0.3.1) unstable; urgency=low
* Thanks: Christopher Arndt for setup.py fix and suggestions.
file:ffafe2424e01902a87547c1aaca53bcb1dbcc0a9 -> file:38dbd6d27ac4508eb0f64a160a1bff8ae5b23fd1
--- a/debian/mp3togo.1
+++ b/debian/mp3togo.1
@@ -134,4 +134,4 @@ License can be found in /usr/share/commo
.PP
mp3togo can be found online at http://puddle.ca/mp3togo
-.\" created by instant / docbook-to-man, Tue 16 May 2006, 13:17
+.\" created by instant / docbook-to-man, Wed 17 May 2006, 18:51
file:53c992da66949c9646cd910a1ca8fd8adf45d8b0 -> file:12e6e7b89dcfd84a6b800871743f2b5e0598207d
--- a/mp3togo/__init__.py
+++ b/mp3togo/__init__.py
@@ -21,5 +21,5 @@
# __all__ = ('converter', 'main', 'options', 'setup')
-version = '0.3.1'
+version = '0.3.2'
file:c9040b3e69fd58deff326afc4813331080caf881 -> file:fc57f0c3a5c1dd9fd7f676285b4f24fcab9b4662
--- a/mp3togo/conf.py
+++ b/mp3togo/conf.py
@@ -129,20 +129,16 @@ Description:
"""
# Check for Third party modules:
- for name in ('ogg.vorbis', 'ID3', 'xmms'):
- try:
- if '.' in name:
- __import__(name, [], [], [name.split('.')[1]])
- else:
- __import__(name)
- except ImportError:
- msg = "Third party module: " + name
- msg += "is not available. Doing without"
- log(1, "Third party module: %s is not available. Doing without")
+ self.mod = {'ogg.vorbis': False,
+ 'ID3': False,
+ 'fictionalmod': False,
+ 'xmms': False}
# Go ahead and read in the data:
self.getconf(argv, conffile, readconf)
+
+
# All hooks are called with the lock held
# must reference the ._d dict directly
def _post_hook(self):
file:7757d29fc0be10e0a10d411f967a75c64c329817 -> file:f6b6c6f29866a7d4747163b508760c8f59f8f1c2
--- a/mp3togo/options.py
+++ b/mp3togo/options.py
@@ -83,6 +83,9 @@ interface.
# Binaries to check for:
self.bin = {}
+
+ # Third party modules to check for:
+ self.mod = {}
self._help_preamble = ""
@@ -210,10 +213,27 @@ interface.
self.bin[bin] = os.path.join(spot, bin)
break
if self.bin[bin]:
- self.log(3, "%s binary found at %s" % (bin, self.bin[bin]))
+ self.log(4, "%s binary found at %s" % (bin, self.bin[bin]))
else:
self.log(2, "%s binary not found" % bin)
+ #Check for third party modules:
+ for name in self.mod.keys():
+ try:
+ if '.' in name:
+ __import__(name, [], [], [name.split('.')[1]])
+ self.mod[name] = True
+ else:
+ __import__(name)
+ except ImportError:
+ msg = "Third party module: " + name
+ msg += "is not available. Doing without"
+ self.log(2, "Third party module: %s is not available. Doing without" % name)
+ self.mod[name] = False
+ else:
+ self.log(4, "Third party module: %s found" % name)
+ self.mod[name] = True
+
#Do any post configuration chores
self._post_hook()
self._unlock()