summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorromangraef <roman.graef@gmail.com>2018-05-31 08:47:20 +0200
committerromangraef <roman.graef@gmail.com>2018-05-31 08:47:20 +0200
commit4ee649a0399b092dbcc22757025555140d03daf0 (patch)
treeec4529bc0074f9928d635f4c45e4b2e8a6657b38
parent9f0f6ae28c96b5226f01856f09f1281b676f4cf5 (diff)
downloadmy-website-4ee649a0399b092dbcc22757025555140d03daf0.tar.gz
my-website-4ee649a0399b092dbcc22757025555140d03daf0.tar.bz2
my-website-4ee649a0399b092dbcc22757025555140d03daf0.zip
heroku
-rw-r--r--app.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/app.py b/app.py
index 4c3f73b..f3c0618 100644
--- a/app.py
+++ b/app.py
@@ -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>')