Skip to content

Commit

Permalink
added flag --module_version to use different Python module (module{.{…
Browse files Browse the repository at this point in the history
…module_version}}.py)
  • Loading branch information
gfursin committed May 29, 2019
1 parent a06c80d commit 1120a6d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
when installed via pip
* added possibility to change default repo
using "CK_DEFAULT_REPO" env var
* added flag --module_version to use different Python module:
(module{.{module_version}}.py)

* V1.9.7
* allowed local widget to fetch data from cKnowledge.org (or other) website:
Expand Down
10 changes: 10 additions & 0 deletions ck/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3441,6 +3441,16 @@ def perform_action(i):
# Load module
mcn=u.get('module_name',cfg['module_code_name'])

if i.get('module_version','')!='':
mcnv=i['module_version'].strip()
if mcnv=='0':
mcnv=''
else:
mcnv=u.get('module_version','')

if mcnv!='':
mcn+='.'+mcnv

r=load_module_from_path({'path':p, 'module_code_name':mcn, 'cfg':u, 'data_uoa':rx['data_uoa']})
if r['return']>0: return r

Expand Down

0 comments on commit 1120a6d

Please sign in to comment.