Skip to content

Commit

Permalink
Merge pull request #289 from minrk/nbextension-install
Browse files Browse the repository at this point in the history
relative import of ConfigManager
  • Loading branch information
Carreau committed Aug 14, 2015
2 parents 309dab2 + 2db0749 commit 6bd8388
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notebook/nbextensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def _config_file_name_default(self):

def enable_nbextension(self, name):
# Local import to avoid circular import issue on Py 2
from notebook.services.config import ConfigManager
from .services.config import ConfigManager
cm = ConfigManager(parent=self, config=self.config)
cm.update(self.section, {"load_extensions": {name: True}})

Expand Down Expand Up @@ -369,7 +369,7 @@ def _config_file_name_default(self):

def disable_nbextension(self, name):
# Local import to avoid circular import issue on Py 2
from notebook.services.config import ConfigManager
from .services.config import ConfigManager
cm = ConfigManager(parent=self, config=self.config)
if name not in cm.get(self.section).get('load_extensions', {}):
sys.exit('{} is not enabled in section {}'.format(name, self.section))
Expand Down

0 comments on commit 6bd8388

Please sign in to comment.