Skip to content

Commit

Permalink
Merge branch 'master' into update-from-upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
devincowan committed Jun 8, 2023
2 parents 3b7c70f + 2c203a5 commit 765c616
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions nbfetch/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,16 +306,16 @@ def get(self):

class HSHandler(ExtensionHandler):
def check_auth(self, authfile=None, username=None, password=None):
if authfile:
with open(authfile, 'rb') as f:
token, cid = pickle.load(f)
hs = HydroShare(client_id=cid, token=token)
else:
hs = HydroShare(username=username, password=password)
self.log.info('hs=%s' % str(hs))

try:
info = hs.getUserInfo()
if authfile:
with open(authfile, 'rb') as f:
token, cid = pickle.load(f)
hs = HydroShare(client_id=cid, token=token)
else:
hs = HydroShare(username=username, password=password)
self.log.info('hs=%s' % str(hs))

info = hs.my_user_info()
self.settings["hydroshare"] = hs
self.log.info("info=%s" % info)
except:
Expand Down Expand Up @@ -398,7 +398,7 @@ def get(self):
self.flush()
return

path = os.path.join(pathid, id, "data", "contents", start)
path = os.path.join(pathid, "data", "contents", start)
if app.lower() == "lab":
path = "lab/tree/" + path
elif path.lower().endswith(".ipynb"):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
packages=find_packages(),
include_package_data=True,
platforms="any",
install_requires=["notebook>=5.5.0", "tornado", "hsclient", "jupyter_server"],
install_requires=["notebook==6.4.6", "tornado", "hsclient", "jupyter_server"],
extras_require={"develop": ["pytest", "pytest-jupyter"]},
data_files=[
("etc/jupyter/jupyter_server_config.d", ["jupyter-config/jupyter_server_config.d/nbfetch.json"])
Expand Down

0 comments on commit 765c616

Please sign in to comment.