Skip to content

Commit

Permalink
Merge pull request #41 from ckadner/patch-1
Browse files Browse the repository at this point in the history
Pass "KERNEL_*" env variables to kernels endpoint
  • Loading branch information
parente authored May 12, 2017
2 parents 947a657 + fab0184 commit 621ab83
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nb2kg/nb2kg/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ def start_kernel(self, kernel_id=None, path=None, **kwargs):
response = yield fetch_kg(
self.kernels_endpoint,
method='POST',
body=json_encode({'name' : kernel_name})
body=json_encode({
'name': kernel_name,
'env': {k:v for (k,v) in dict(os.environ).items() if k.startswith('KERNEL_')}
})
)
kernel = json_decode(response.body)
kernel_id = kernel['id']
Expand Down

0 comments on commit 621ab83

Please sign in to comment.