Skip to content

Commit

Permalink
Merge pull request #1084 from basnijholt/patch-3
Browse files Browse the repository at this point in the history
Properly close js and css files after opening
  • Loading branch information
philippjfr committed Jan 27, 2017
2 parents 13702cc + 9d1e390 commit c07680f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions holoviews/plotting/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,15 @@ def html_assets(cls, core=True, extras=True, backends=None):

# Join all the js widget code into one string
path = os.path.dirname(os.path.abspath(__file__))
widgetjs = '\n'.join(open(find_file(path, f), 'r').read()
for f in basejs + extensionjs
if f is not None )
widgetcss = '\n'.join(open(find_file(path, f), 'r').read()

def open_and_read(path, f):
with open(find_file(path, f), 'r') as f:
txt = f.read()
return txt

widgetjs = '\n'.join(open_and_read(path, f)
for f in basejs + extensionjs if f is not None)
widgetcss = '\n'.join(open_and_read(path, f)
for f in css if f is not None)

dependencies = {}
Expand Down

0 comments on commit c07680f

Please sign in to comment.