neddit

the frontend of the frontpage of the internet  https://neddit.ce9e.org
git clone https://git.ce9e.org/neddit.git

commit
2b8c910b9a375c73d23773211c13c892adf007af
parent
c2f1e6142c72639f45f24f0b46331bff5d209a0c
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2020-07-26 06:23
forward upstream errors

Diffstat

M neddit.py 4 +++-

1 files changed, 3 insertions, 1 deletions


diff --git a/neddit.py b/neddit.py

@@ -5,6 +5,7 @@ import requests
    5     5 import jinja2
    6     6 from flask import Flask
    7     7 from flask import request
   -1     8 from flask import abort
    8     9 
    9    10 app = Flask(__name__)
   10    11 env = jinja2.Environment(loader=jinja2.FileSystemLoader('templates'))
@@ -47,7 +48,8 @@ def fetch(url, **params):
   47    48 		headers={'User-agent': 'neddit'},
   48    49 		params={'raw_json': 1, **params},
   49    50 	)
   50    -1 	r.raise_for_status()
   -1    51 	if r.status_code != 200:
   -1    52 		abort(r.status_code)
   51    53 	return r.json()
   52    54 
   53    55