]> git.0d.be Git - jack_mixer.git/commitdiff
Add parameter (--no-lash) to *not* connect to LASH
authorFrédéric Péters <fpeters@0d.be>
Wed, 16 Dec 2009 13:08:01 +0000 (14:08 +0100)
committerFrédéric Péters <fpeters@0d.be>
Wed, 16 Dec 2009 13:08:01 +0000 (14:08 +0100)
jack_mixer.py

index 9b1d8947bfff9072617a4d72855950976c014c2d..2cf59640db54b29bb89f68d1ea7624ca77f1f307 100755 (executable)
@@ -588,14 +588,21 @@ def help():
     print "Usage: %s [mixer_name]" % sys.argv[0]
 
 def main():
-    if lash:                        # If LASH python bindings are available
+    # Connect to LASH if Python bindings are available, and the user did not
+    # pass --no-lash
+    if lash and not '--no-lash' in sys.argv:
         # sys.argv is modified by this call
         lash_client = lash.init(sys.argv, "jack_mixer", lash.LASH_Config_File)
     else:
         lash_client = None
 
     parser = OptionParser()
-    parser.add_option('-c', '--config', dest='config')
+    parser.add_option('-c', '--config', dest='config',
+                      help='use a non default configuration file')
+    # --no-lash here is not acted upon, it is specified for completeness when
+    # --help is passed.
+    parser.add_option('--no-lash', dest='nolash', action='store_true',
+                      help='do not connect to LASH')
     options, args = parser.parse_args()
 
     # Yeah , this sounds stupid, we connected earlier, but we dont want to show this if we got --help option