Skip to content

Commit 9276204

Browse files
committed
fixing bug when calling kernel actions with a current path in some CK entry
1 parent 055e135 commit 9276204

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
* V1.6.1
2+
* fixing bug when calling kernel actions while current path is in some CK entry
3+
14
* V1.6.0
25
* changing version standard
36

ck/kernel.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"detect_cur_cid":"#",
4545
"detect_cur_cid1":"^",
4646

47-
"version":["1", "6", "0"],
47+
"version":["1", "6", "1"],
4848
"error":"CK error: ",
4949
"json_sep":"*** ### --- CK JSON SEPARATOR --- ### ***",
5050
"default_module":"data",
@@ -2761,6 +2761,7 @@ def perform_action(i):
27612761
ruoa=r.get('repo_uoa','')
27622762
if ruoa!='': i['repo_uoa']=ruoa
27632763

2764+
27642765
# If module_uoa exists in input, set module_uoa
27652766
if i.get('module_uoa','')!='': module_uoa=i['module_uoa']
27662767
i['module_uoa']=module_uoa
@@ -2810,10 +2811,12 @@ def perform_action(i):
28102811
cf=i.get('common_func','')
28112812

28122813
# Check if no module_uoa, not common function, then try to get module from current
2814+
module_detected_from_dir=False
28132815
if not need_subst and cf!='yes' and module_uoa=='' and action not in cfg['common_actions']:
28142816
rc=detect_cid_in_current_path({})
28152817
if rc['return']==0:
28162818
module_uoa=rc.get('module_uoa','')
2819+
module_detected_from_dir=True
28172820

28182821
xmodule_uoa=module_uoa
28192822
if cf!='yes' and module_uoa!='' and module_uoa.find('*')<0 and module_uoa.find('?')<0:
@@ -2867,7 +2870,7 @@ def perform_action(i):
28672870

28682871
# Check if action == special keyword (add, delete, list, etc)
28692872
if (module_uoa!='' and action in cfg['common_actions']) or \
2870-
(module_uoa=='' and action in cfg['actions']):
2873+
((module_uoa=='' or module_detected_from_dir) and action in cfg['actions']):
28712874
# Check function redirect - needed if action
28722875
# is the same as internal python keywords such as list
28732876
action1=cfg['actions_redirect'].get(action,'')

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
ck (1.6.1) unstable; urgency=low
2+
3+
* fixing bug when calling kernel actions while current path is in some CK entry
4+
5+
-- Grigori Fursin <[email protected]> 17 Sep 2015 11:22:13 +0100
6+
17
ck (1.6.0) unstable; urgency=low
28

39
* changing version standard

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setup(
1111
name='ck',
12-
version='1.6.0',
12+
version='1.6.1',
1313
url='https://github.com/ctuning/ck/wiki',
1414
license='BSD 3-clause',
1515
author='Grigori Fursin and non-profit cTuning foundation',

setup.py.debian

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ from distutils.core import setup
99

1010
setup(
1111
name='ck',
12-
version='1.6.0',
12+
version='1.6.1',
1313
url='https://github.com/ctuning/ck/wiki',
1414
license='BSD 3-clause',
1515
author='Grigori Fursin and non-profit cTuning foundation',

0 commit comments

Comments
 (0)