]> git.0d.be Git - jack_mixer.git/commitdiff
Disable lash also if python-xml is missing
authorFrédéric Péters <fpeters@0d.be>
Fri, 23 Oct 2009 17:57:02 +0000 (19:57 +0200)
committerFrédéric Péters <fpeters@0d.be>
Fri, 23 Oct 2009 17:57:02 +0000 (19:57 +0200)
jack_mixer.py

index 01f5387654ff4269d0ba7829fd30bf3590119a86..74bd09898277e03d77e2d00473cd954f641a857d 100755 (executable)
@@ -27,7 +27,6 @@ import os
 try:
     import lash
 except:
-    print "Cannot load LASH python bindings, you want LASH unless you enjoy manual jack plumbing each time you use this app"
     lash = None
 
 old_path = sys.path
@@ -41,8 +40,14 @@ sys.path = old_path
 
 # no need for serialization if there is no LASH available
 if lash:
-    from serialization_xml import xml_serialization
-    from serialization import serialized_object, serializator
+    try:
+        from serialization_xml import xml_serialization
+        from serialization import serialized_object, serializator
+    except ImportError:
+        lash = None
+
+if lash is None:
+    print >> sys.stderr, "Cannot load LASH python bindings or python-xml, you want them unless you enjoy manual jack plumbing each time you use this app"
 
 class jack_mixer(serialized_object):