bug fix: disk menu read

master
Steve Nyemba 10 months ago
parent 9e051bc6a6
commit d06e352233

@ -29,8 +29,14 @@ def build (_config): #(_path,_content):
_path = _config['layout']['root'] _path = _config['layout']['root']
_items = folders(_path) _items = folders(_path)
_subItems = [ content (os.sep.join([_path,_name]))for _name in _items ] _subItems = [ content (os.sep.join([_path,_name]))for _name in _items ]
# return dict(zip()) _r = {}
return dict.fromkeys(_items,_subItems) for _name in _items :
_index = _items.index(_name)
if _name not in _r :
_r[_name] = []
_r[_name] += _subItems[_index]
return _r
# return dict.fromkeys(_items,_subItems)
def html(uri) : def html(uri) :
_html = (open(uri)).read() _html = (open(uri)).read()

@ -149,7 +149,6 @@ class Loader :
_path = os.sep.join([PATH,_key+".py"]) _path = os.sep.join([PATH,_key+".py"])
if not os.path.exists(_path): if not os.path.exists(_path):
print ([' ?? ',_path])
continue continue
for _name in _conf[_key] : for _name in _conf[_key] :
_pointer = self._load_plugin(path=_path,name=_name) _pointer = self._load_plugin(path=_path,name=_name)
@ -303,7 +302,7 @@ class Router :
for _name in _system : for _name in _system :
_path = _system[_name]['path'] _path = _system[_name]['path']
self._apps[_name] = Getter(path=_path,caller=_app,location=_path) self._apps[_name] = Getter(path=_path,caller=_app,location=_path)
print ([_name, self._apps[_name].plugins().keys()]) # print ([_name, self._apps[_name].plugins().keys()])
self._apps['main'] = _app self._apps['main'] = _app
def set(self,_id): def set(self,_id):
self._id = _id self._id = _id

Loading…
Cancel
Save