devknight / gitinspector

Automatically exported from code.google.com/p/gitinspector
GNU General Public License v3.0
0 stars 0 forks source link

Doesn't start when using "C" locale #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When LANG environment variable is set to C, the following happens:

% ./gitinspector/gitinspector.py -h
Traceback (most recent call last):
  File "./gitinspector/gitinspector.py", line 25, in <module>
    localization.init()
  File "./gitinspector/localization.py", line 54, in init
    filename = basedir.get_basedir() + "/translations/messages_%s.mo" % lang[0][0:2]
TypeError: 'NoneType' object is unsubscriptable

The attached fix avoids the problem by not using translations in this case.

Original issue reported on code.google.com by vzeitlin@gmail.com on 7 Jun 2014 at 9:21

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for the fix. I will look into it (and merge it to master) when I have 
time.

/Adam Waldenberg

Original comment by gitinspe...@ejwa.se on 8 Jun 2014 at 11:24

GoogleCodeExporter commented 9 years ago
The fix is needed even for setup portion:

+ /usr/bin/python setup.py build --build-base build-2
Traceback (most recent call last):
  File "setup.py", line 22, in <module>
    from gitinspector.version import __version__ 
  File "/home/users/glen/rpm/BUILD/x86_64-linux/gitinspector-0.3.2/gitinspector/version.py", line 27, in <module> 
    import gitinspector.localization
  File "/home/users/glen/rpm/BUILD/x86_64-linux/gitinspector-0.3.2/gitinspector/gitinspector.py", line 25, in <module>
    localization.init()
  File "/home/users/glen/rpm/BUILD/x86_64-linux/gitinspector-0.3.2/gitinspector/localization.py", line 50, in init
    filename = basedir.get_basedir() + "/translations/messages_%s.mo" % lang[0][0:2]
TypeError: 'NoneType' object has no attribute '__getitem__'
error: Bad exit status from /home/users/glen/tmp/rpm-tmp.93968 (%build)

Original comment by elan.ruu...@gmail.com on 8 Nov 2014 at 5:49

GoogleCodeExporter commented 9 years ago

Original comment by gitinspe...@ejwa.se on 24 Nov 2014 at 8:04

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 8755fb33dcb1.

Original comment by gitinspe...@ejwa.se on 24 Nov 2014 at 8:37