Skip to content
This repository was archived by the owner on Feb 4, 2021. It is now read-only.

Commit 7801247

Browse files
authored
Merge pull request #57 from mdboom/fix-oath-client-id
Fix #53, Fix #56: Don't corrupt notebook.json when no oauth_client_id
2 parents 24523fc + 0ff0389 commit 7801247

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
'notebook >= 4.2',
1616
'jupyter',
1717
'requests',
18+
'six',
1819
'widgetsnbextension',
1920
],
2021
url='https://github.com/mozilla/jupyter-notebook-gist',

src/jupyter_notebook_gist/config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import six
12
from traitlets.config import LoggingConfigurable
23
from traitlets.traitlets import Unicode
34

@@ -19,6 +20,9 @@ def __init__(self, *args, **kwargs):
1920
super(NotebookGist, self).__init__(*args, **kwargs)
2021
# update the frontend settings with the currently passed
2122
# OAUTH client id
23+
client_id = self.config.NotebookGist.oauth_client_id
24+
if not isinstance(client_id, six.string_types):
25+
client_id = None
2226
self.config_manager.update('notebook', {
23-
'oauth_client_id': self.config.NotebookGist.oauth_client_id,
27+
'oauth_client_id': client_id,
2428
})

0 commit comments

Comments
 (0)