check if version file exists
This commit is contained in:
4
app.py
4
app.py
@@ -69,7 +69,9 @@ def close_connection(exception):
|
||||
|
||||
@app.route('/')
|
||||
def route_index():
|
||||
version = json.load(open('version.json', 'r'))
|
||||
version = None
|
||||
if os.path.isfile('version.json'):
|
||||
version = json.load(open('version.json', 'r'))
|
||||
return render_template('index.html', version=version)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user