projects
/
mudpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported from archive.
[mudpy.git]
/
lib
/
muff
/
muffmenu.py
diff --git
a/lib/muff/muffmenu.py
b/lib/muff/muffmenu.py
index
b84f783
..
cdf0d5c
100644
(file)
--- a/
lib/muff/muffmenu.py
+++ b/
lib/muff/muffmenu.py
@@
-19,16
+19,18
@@
for module in muff.__all__:
# see if the menupath can be retrieved from muffconf
try:
# see if the menupath can be retrieved from muffconf
try:
- if muffconf.
config_data.
get("files", "menus"): pass
+ if muffconf.get("files", "menus"): pass
# otherwise, reload muffconf
except AttributeError:
reload(muffconf)
# otherwise, reload muffconf
except AttributeError:
reload(muffconf)
-# build a list of files in the menus directory
+# now we can safely nab the menu path setting and build a list of data files
+menu_path = muffconf.get("files", "menus")
+menu_files_index = ConfigParser.SafeConfigParser()
+menu_files_index.read(menu_path + "/index")
menu_files = []
menu_files = []
-menu_path = muffconf.config_data.get("files", "menus")
-for each_file in os.listdir(menu_path):
+for each_file in menu_files_index.get("index", "files").split():
menu_files.append(menu_path + "/" + each_file)
# read the menu files
menu_files.append(menu_path + "/" + each_file)
# read the menu files