Skip to content

Commit

Permalink
Explicitly specify instance_path, because Flask's auto_find_instance_…
Browse files Browse the repository at this point in the history
…path can fail when run in a frozen app.
  • Loading branch information
wettenhj committed Jan 5, 2017
1 parent 19fe780 commit 2e40ac0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wxupdatedemo/fileserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
def RunFileServer(fileServerDir, fileServerPort):
"""
Run a Flask file server on the given port.
Explicitly specify instance_path, because Flask's
auto_find_instance_path can fail when run in a frozen app.
"""
app = Flask(__name__)
app = Flask(__name__, instance_path=fileServerDir)

@app.route('/fileserver-is-ready', methods=['GET'])
def FileserverIsReady(): # pylint: disable=unused-variable
Expand Down

0 comments on commit 2e40ac0

Please sign in to comment.