Skip to content

Commit

Permalink
fixed problem with --help or --get_api from kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
gfursin committed Aug 23, 2016
1 parent a80ba79 commit a9497bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
* V1.7.4dev
* extended run_and_get_stdout kernel function
* fixed problem in run_and_get_stdout (ValueError: I/O operation on closed file)
* fixed problem with --help or --get_api from kernel

* V1.7.3
* fixed rare bug when 'return' is non-integer in remote CK access (such as during crowd-tuning and crowd-testing)
Expand Down
9 changes: 6 additions & 3 deletions ck/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2041,7 +2041,7 @@ def init(i):
p=py
break
elif px!='':
work['env_root']=px
work['env_root']=px

if p=='':
return {'return':1, 'error':'Internal CK error (can\'t find default repo) - please report to authors'}
Expand Down Expand Up @@ -3265,7 +3265,6 @@ def get_api(i):
}
"""


p=i.get('path','')
f=i.get('func','')
o=i['out']
Expand All @@ -3282,7 +3281,11 @@ def get_api(i):
p=rx['path']

if p=='':
p=os.path.join(work['env_root'], cfg['file_kernel_py'])
p1=os.path.dirname(os.path.dirname(work['dir_default_repo']))
p=os.path.join(p1, cfg['file_kernel_py'])

if not os.path.isfile(p):
return {'return':1, 'error':'kernel not found in '+p}
else:
p=os.path.join(p, 'module.py')

Expand Down

0 comments on commit a9497bf

Please sign in to comment.