[alacarte] MenuEditor: deal with the case of having no $XDG_MENU_PREFIX
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [alacarte] MenuEditor: deal with the case of having no $XDG_MENU_PREFIX
- Date: Tue, 23 Oct 2012 03:09:01 +0000 (UTC)
commit fe7211f2eb4c8bcf7cbddca75bf4e28ee7b98659
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Oct 22 23:08:38 2012 -0400
MenuEditor: deal with the case of having no $XDG_MENU_PREFIX
Alacarte/MenuEditor.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/Alacarte/MenuEditor.py b/Alacarte/MenuEditor.py
index 386b382..8d992ca 100644
--- a/Alacarte/MenuEditor.py
+++ b/Alacarte/MenuEditor.py
@@ -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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]