Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if urlPath:
path = urlPath
else:
repo_dir = repo.split('/')[-1]
path = os.path.join(repo_dir, subPath)
if app.lower() == 'lab':
path = 'lab/tree/' + path
elif path.lower().endswith('.ipynb'):
path = 'notebooks/' + path
else:
path = 'tree/' + path
self.write(
self.render_template(
'status.html',
repo=repo, branch=branch, path=path, depth=depth, version=__version__
))
self.flush()