Package: jack / 3.1.1+cvs20050801-31

49_nicer_ripper_encoder.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
When you specify an unknown ripper or encoder, jack prints a python
array...

247:tbm@reyes: ~/tmp/jack] jack -E dasdas
This is jack 3.1.1 (C)2004 Arne Zellentin <zarne@users.sf.net>
 *error* Invalid encoder, choose one of ['bladeenc', 'xing', 'mppenc', 'lame',
         'oggenc', 'l3enc', 'gogo', 'mp3enc', 'flac', 'lame-user']
zsh: exit 1     jack -E dasdas

Print a more readable message instead.


diff -urN jack-3.1.1+cvs20050801~/jack_checkopts.py jack-3.1.1+cvs20050801/jack_checkopts.py
--- jack-3.1.1+cvs20050801~/jack_checkopts.py	2006-04-04 23:40:24.000000000 +0200
+++ jack-3.1.1+cvs20050801/jack_checkopts.py	2006-04-04 23:41:39.000000000 +0200
@@ -173,14 +173,14 @@
         for i in jack_helpers.helpers.keys():
             if jack_helpers.helpers[i]['type'] == "encoder":
                 dummy.append(i)
-        error("Invalid encoder, choose one of " + `dummy`)
+        error("Invalid encoder, choose one of " + ", ".join(dummy))
 
     if not jack_helpers.helpers.has_key(cf['_ripper']) or jack_helpers.helpers[cf['_ripper']]['type'] != "ripper":
         dummy = []
         for i in jack_helpers.helpers.keys():
             if jack_helpers.helpers[i]['type'] == "ripper":
                 dummy.append(i)
-        error("Invalid ripper, choose one of " + `dummy`)
+        error("Invalid ripper, choose one of " + ", ".join(dummy))
 
     if (cf['vbr_quality']['val'] > 10) or (cf['vbr_quality']['val'] < -1):
         error("invalid vbr quality, must be between -1 and 10")