Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
GoogleCodeExporter opened this issue Aug 23, 2015 · 4 comments
Closed

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

GoogleCodeExporter opened this issue Aug 23, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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

  • Added labels: Milestone-Release0.4.0

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision 8755fb33dcb1.

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

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants