Commit fe7211f2 authored by Jasper St. Pierre's avatar Jasper St. Pierre

MenuEditor: deal with the case of having no $XDG_MENU_PREFIX

parent 7d62fd21
......@@ -23,7 +23,7 @@ from gi.repository import GMenu, GLib
from Alacarte import util
class MenuEditor(object):
def __init__(self, name=os.environ['XDG_MENU_PREFIX'] + 'applications.menu'):
def __init__(self, name=os.environ.get('XDG_MENU_PREFIX', '') + 'applications.menu'):
self.name = name
self.tree = GMenu.Tree.new(name, GMenu.TreeFlags.SHOW_EMPTY|GMenu.TreeFlags.INCLUDE_EXCLUDED|GMenu.TreeFlags.INCLUDE_NODISPLAY|GMenu.TreeFlags.SHOW_ALL_SEPARATORS|GMenu.TreeFlags.SORT_DISPLAY_NAME)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment