Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#6682 beaker config is moved to .bak by beakerx-install #6684

Merged
merged 3 commits into from
Jan 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions beakerx/beakerx/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

from string import Template
from jupyter_client.kernelspecapp import KernelSpecManager
from jupyter_core import paths
from traitlets.config.manager import BaseJSONConfigManager
from distutils import log

Expand Down Expand Up @@ -127,6 +128,11 @@ def _install_magics():
file.write("c.InteractiveShellApp.extensions = ['beakerx.groovy_magic']")
file.close()

def _set_conf_privileges():
config_path = os.path.join(paths.jupyter_config_dir(), 'beakerx.json')
if pathlib.Path(config_path).exists():
os.chmod(config_path, 0o600)


def _pretty(it):
return json.dumps(it, indent=2)
Expand Down Expand Up @@ -187,6 +193,7 @@ def _install_beakerx(args):
_copy_icons()
_install_kernelspec_manager(args.prefix)
_install_magics()
_set_conf_privileges()


def install():
Expand Down