diff options
author | romangraef <roman.graef@gmail.com> | 2018-05-31 08:47:20 +0200 |
---|---|---|
committer | romangraef <roman.graef@gmail.com> | 2018-05-31 08:47:20 +0200 |
commit | 4ee649a0399b092dbcc22757025555140d03daf0 (patch) | |
tree | ec4529bc0074f9928d635f4c45e4b2e8a6657b38 | |
parent | 9f0f6ae28c96b5226f01856f09f1281b676f4cf5 (diff) | |
download | my-website-4ee649a0399b092dbcc22757025555140d03daf0.tar.gz my-website-4ee649a0399b092dbcc22757025555140d03daf0.tar.bz2 my-website-4ee649a0399b092dbcc22757025555140d03daf0.zip |
heroku
-rw-r--r-- | app.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -14,8 +14,11 @@ class Project(JsonSerializable): link: str -with open('projects.json') as handle: - project_data: List[Project] = from_json(json.load(handle), List[Project]) +try: + with open('projects.json') as handle: + project_data: List[Project] = from_json(json.load(handle), List[Project]) +except: + project_data = [] @app.route('/projects/<project_name>') |