Fixes for use dashboard in modules
This commit is contained in:
parent
8a0354b85b
commit
ff81d2aa8d
3 changed files with 69 additions and 8 deletions
|
|
@ -3,7 +3,7 @@
|
|||
import os
|
||||
from collections import OrderedDict
|
||||
|
||||
def scandir(mydir, config_parser, arr_dir=OrderedDict(), father=''):
|
||||
def scandir(mydir, config_parser, arr_dir=OrderedDict(), arr_hash={}, father=''):
|
||||
|
||||
search_dir=os.listdir(mydir)
|
||||
|
||||
|
|
@ -35,11 +35,12 @@ def scandir(mydir, config_parser, arr_dir=OrderedDict(), father=''):
|
|||
form=config_parser['form'][k]
|
||||
|
||||
arr_dir[father][os.path.basename(mydir)].append([config_parser['modules'][k], mydir+'/'+k+'.py', 1, form])
|
||||
arr_hash[mydir+'/'+k+'.py']=[config_parser['modules'][k], mydir+'/'+k+'.py', 1, form]
|
||||
|
||||
|
||||
elif os.path.isdir(mydir+'/'+one_path):
|
||||
|
||||
arr_dir=scandir(mydir+'/'+one_path, config_parser, arr_dir, os.path.basename(mydir))
|
||||
(arr_dir, arr_hash)=scandir(mydir+'/'+one_path, config_parser, arr_dir, arr_hash, os.path.basename(mydir))
|
||||
|
||||
return arr_dir
|
||||
return (arr_dir, arr_hash)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue