crashes with an UnboundLocalError

Bug #520087 reported by Jens Adam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python XDG App
New
Undecided
Unassigned

Bug Description

In "XdgApplication.get_config" it crashes with an UnboundLocalError if "app_config" is false.

It happens if I try to start Nautilus as root (with Ground Control installed):

jens@jens-karmic-testing:~$ gksu nautilus
[...]
Initializing groundcontrol-1.3.1 extension
Traceback (most recent call last):
  File "/usr/lib/nautilus/extensions-2.0/python/nautilus-groundcontrol.py", line 61, in __init__
    self.xdg_dir = PROJECT_XDG.get_data_path('projects', HOME_DIR)
  File "/usr/lib/python2.6/dist-packages/xdgapp.py", line 86, in get_data_path
    content = self.get_config('user-dirs.dirs', False)
  File "/usr/lib/python2.6/dist-packages/xdgapp.py", line 113, in get_config
    if os.path.exists(conf):
UnboundLocalError: local variable 'conf' referenced before assignment
[...]

Adding the line
conf = ""
worked for me (allowing me to launch Nautilus), I have no idea what affect this line has on the functionality...

(Sorry if something is unclear, first try on a bug reprot ;-))

Jens Adam (karajan)
description: updated
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.