summaryrefslogtreecommitdiff
path: root/debian/patches/47_locale_check.patch
blob: 90711fd9e750f9da0f1491f9af3204f1a971cfc0 (plain)
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
jack produces a traceback when the locale is not known or hasn't been
generated.  Therefore check whether it is known.

--- a/jack_config.py~	2006-04-04 19:43:03.000000000 +0200
+++ b/jack_config.py	2006-04-04 19:45:11.000000000 +0200
@@ -22,12 +22,20 @@
 import string
 import jack_misc
 import locale
+import sys
 
 import jack_version
 from jack_globals import *
 
 # this must be filled manually (done in main)
 
+# we need a working locale
+try:
+    locale.getpreferredencoding()
+except locale.Error, e:
+    print "Locale problem:", e
+    sys.exit(1)
+
 # config space with attributes
 
 cf = jack_misc.dict2({