Crash if LANG is not set in the environment

Bug #340819 reported by Luca Falavigna
2
Affects Status Importance Assigned to Milestone
BleachBit
Fix Released
High
Unassigned

Bug Description

BleachBit crashes if LANG is not set in the environment.

Steps to reproduce this behaviour:
1) ~/.config/bleachbit/bleachbit.ini must not have preserve_languages section
2) Run env -u LANG bleachbit
3) Trackeback is displayed:
Traceback (most recent call last):
  File "/usr/bin/bleachbit", line 3, in <module>
    import bleachbit.GUI
  File "/var/lib/python-support/python2.6/bleachbit/GUI.py", line 32, in <module>
    import FileUtilities
  File "/var/lib/python-support/python2.6/bleachbit/FileUtilities.py", line 40, in <module>
    from Options import options
  File "/var/lib/python-support/python2.6/bleachbit/Options.py", line 184, in <module>
    options = Options()
  File "/var/lib/python-support/python2.6/bleachbit/Options.py", line 54, in __init__
    pos = lang.find('_')
AttributeError: 'NoneType' object has no attribute 'find'

Attached is a workaround for this issue (not very frequent, though).

Revision history for this message
Luca Falavigna (dktrkranz) wrote :
Andrew Ziem (ahziem1)
Changed in bleachbit:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Andrew Ziem (ahziem1) wrote :
Changed in bleachbit:
status: Triaged → Fix Committed
Revision history for this message
Andrew Ziem (ahziem1) wrote :

fix released April 13 in 0.4.1

Changed in bleachbit:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.