tomka       15/01/30 22:05:10

  Added:                wicd-1.7.3-undefined-LANG.patch
  Log:
  Fix bug 537202 and python_export_best deprecation
  
  (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 
565C32BC)

Revision  Changes    Path
1.1                  net-misc/wicd/files/wicd-1.7.3-undefined-LANG.patch

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
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

Index: wicd-1.7.3-undefined-LANG.patch
===================================================================
Fixes compilation errors when os.environ['LANG'] is undefiend
--- ./setup.py
+++ ./setup.py
@@ -621,7 +621,7 @@ class compile_translations(Command):
                 shutil.rmtree('translations/')
             os.makedirs('translations')
 
-            oldlang = os.environ['LANG']
+            oldlang = os.environ.get('LANG', None)
             os.environ['LANG'] = 'C'
 
             for pofile in sorted(glob('po/*.po')):
@@ -656,7 +656,10 @@ class compile_translations(Command):
                     os.makedirs('translations/' + lang + '/LC_MESSAGES/')
                     os.system('pybabel compile -D wicd -i %s -l %s -d 
translations/' % (pofile, lang))
 
-            os.environ['LANG'] = oldlang
+            if oldlang is not None:
+                os.environ['LANG'] = oldlang
+            else:
+                del os.environ['LANG']
 
 class uninstall(Command):
     description = "remove Wicd using uninstall.sh and install.log"




Reply via email to