summaryrefslogtreecommitdiff
path: root/wicd/wicd-1.7.3-undefined-LANG.patch
blob: b854607d9583abe04ca94c12f31527fa4eaf0fe5 (plain)
    1 Fixes compilation errors when os.environ['LANG'] is undefiend
    2 --- ./setup.py
    3 +++ ./setup.py
    4 @@ -621,7 +621,7 @@ class compile_translations(Command):
    5                  shutil.rmtree('translations/')
    6              os.makedirs('translations')
    7  
    8 -            oldlang = os.environ['LANG']
    9 +            oldlang = os.environ.get('LANG', None)
   10              os.environ['LANG'] = 'C'
   11  
   12              for pofile in sorted(glob('po/*.po')):
   13 @@ -656,7 +656,10 @@ class compile_translations(Command):
   14                      os.makedirs('translations/' + lang + '/LC_MESSAGES/')
   15                      os.system('pybabel compile -D wicd -i %s -l %s -d translations/' % (pofile, lang))
   16  
   17 -            os.environ['LANG'] = oldlang
   18 +            if oldlang is not None:
   19 +                os.environ['LANG'] = oldlang
   20 +            else:
   21 +                del os.environ['LANG']
   22  
   23  class uninstall(Command):
   24      description = "remove Wicd using uninstall.sh and install.log"

Generated by cgit