diff --git a/shop.py b/shop.py index 140f961..28afdf0 100644 --- a/shop.py +++ b/shop.py @@ -119,6 +119,8 @@ def show_shop(shopid): return redirect(url_for('list_shops')) data_dir=os.path.join(DATADIR, get_username(row[2])) data_file=os.path.join(data_dir, row[1]+".md") + if not os.path.exists(data_file): + open(data_file, 'wt').close() entries=[] content=open(data_file, 'rt').read().decode('utf-8') for i,row in enumerate(open( data_file, 'rt').read().decode('utf-8').split("\n")):