Skip to content

Commit

Permalink
Allow for license to have a .txt extension
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Nov 22, 2024
1 parent 3ddb1dc commit 01a0e86
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions notebook/process_notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,11 +654,12 @@ def get_page_map():


def get_license():
fname = os.path.join(TOPDIR, 'LICENSE')
if not os.path.exists(fname):
return b''
with open(fname, 'rb') as fh:
return fh.read()
for fname in ('LICENSE', 'LICENSE.txt'):
full_fname = os.path.join(TOPDIR, fname)
if os.path.exists(full_fname):
with open(full_fname, 'rb') as fh:
return fh.read()
return b''


def get_license_link():
Expand Down

0 comments on commit 01a0e86

Please sign in to comment.