Skip to content

Commit

Permalink
improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
taojy123 committed Aug 18, 2020
1 parent ee069eb commit a1e6e65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion locust/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ def stats_report():
js_files = ['jquery-1.11.3.min.js', 'echarts.common.min.js', 'vintage.js', 'chart.js']
for js_file in js_files:
path = os.path.join(os.path.dirname(__file__), 'static', js_file)
content = open(path, encoding='utf8').read()
with open(path, encoding='utf8') as f:
content = f.read()
static_js += '// ' + js_file + '\n'
static_js += content
static_js += '\n\n\n'
Expand Down

0 comments on commit a1e6e65

Please sign in to comment.