From: | "Thomas Kahle (tomka)" <tomka@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in net-misc/wicd/files: wicd-1.7.3-undefined-LANG.patch |
Date: | Fri, 30 Jan 2015 22:05:14 |
Message-Id: | 20150130220510.57DC210B72@oystercatcher.gentoo.org |
1 | tomka 15/01/30 22:05:10 |
2 | |
3 | Added: wicd-1.7.3-undefined-LANG.patch |
4 | Log: |
5 | Fix bug 537202 and python_export_best deprecation |
6 | |
7 | (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 565C32BC) |
8 | |
9 | Revision Changes Path |
10 | 1.1 net-misc/wicd/files/wicd-1.7.3-undefined-LANG.patch |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/wicd/files/wicd-1.7.3-undefined-LANG.patch?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/wicd/files/wicd-1.7.3-undefined-LANG.patch?rev=1.1&content-type=text/plain |
14 | |
15 | Index: wicd-1.7.3-undefined-LANG.patch |
16 | =================================================================== |
17 | Fixes compilation errors when os.environ['LANG'] is undefiend |
18 | --- ./setup.py |
19 | +++ ./setup.py |
20 | @@ -621,7 +621,7 @@ class compile_translations(Command): |
21 | shutil.rmtree('translations/') |
22 | os.makedirs('translations') |
23 | |
24 | - oldlang = os.environ['LANG'] |
25 | + oldlang = os.environ.get('LANG', None) |
26 | os.environ['LANG'] = 'C' |
27 | |
28 | for pofile in sorted(glob('po/*.po')): |
29 | @@ -656,7 +656,10 @@ class compile_translations(Command): |
30 | os.makedirs('translations/' + lang + '/LC_MESSAGES/') |
31 | os.system('pybabel compile -D wicd -i %s -l %s -d translations/' % (pofile, lang)) |
32 | |
33 | - os.environ['LANG'] = oldlang |
34 | + if oldlang is not None: |
35 | + os.environ['LANG'] = oldlang |
36 | + else: |
37 | + del os.environ['LANG'] |
38 | |
39 | class uninstall(Command): |
40 | description = "remove Wicd using uninstall.sh and install.log" |