diff --git a/app/views/general.py b/app/views/general.py
index 635386c..1e94dd7 100644
--- a/app/views/general.py
+++ b/app/views/general.py
@@ -44,7 +44,7 @@ def css():
# Here seasonal themes will be returned; matching the current date.
# Open the YAML file with all the themes.
- path = os.path.join(str(app.root_path), "views/themes.yml")
+ path = os.path.join(app.root_path, "views/themes.yml")
with open(path, 'r') as stream:
data = yaml.safe_load(stream)
# Build a dictionary from the YAML file with all the themes and there attributes.
@@ -81,13 +81,13 @@ def css():
if (((end_month == current_month) and
(end_day >= current_day)) or
(end_month > current_month)):
- path = os.path.join(str(app.root_path), cssPath, theme['file'])
+ path = os.path.join(app.root_path, cssPath, theme['file'])
break
else:
if request.cookies['theme'] == 'darkmode' :
- path = os.path.join(str(app.root_path), "static/css/themes/lowPerformance/darkmode.css")
+ path = os.path.join(app.root_path, "static/css/themes/lowPerformance/darkmode.css")
else:
- path = os.path.join(str(app.root_path), "static/css/themes/lowPerformance/lightmode.css")
+ path = os.path.join(app.root_path, "static/css/themes/lowPerformance/lightmode.css")
# Tijdelijk ongebruikt tot bewezen dat het veilig is
#try:
@@ -96,7 +96,7 @@ def css():
#except IOError:
# f = open(cssPath+"lightmode.css")
else:
- path = os.path.join(str(app.root_path), "static/css/themes/lowPerformance/lightmode.css")
+ path = os.path.join(app.root_path, "static/css/themes/lowPerformance/lightmode.css")
f = open(path)
response = make_response(f.read())
response.headers['Content-Type'] = 'text/css'
@@ -146,13 +146,13 @@ def favicon() -> str:
# pylint: disable=R1705
if not get_orders((Order.stoptime > datetime.now())):
return send_from_directory(
- os.path.join(str(app.root_path), "static"),
+ os.path.join(app.root_path, "static"),
"favicon.ico",
mimetype="image/x-icon",
)
else:
return send_from_directory(
- os.path.join(str(app.root_path), "static"),
+ os.path.join(app.root_path, "static"),
"favicon_orange.ico",
mimetype="image/x-icon",
)
diff --git a/app/zeus.py b/app/zeus.py
index 043f110..4b49d74 100644
--- a/app/zeus.py
+++ b/app/zeus.py
@@ -31,7 +31,7 @@ def authorized() -> typing.Any:
request.args["error_description"],
)
if isinstance(resp, OAuthException):
- return "Access denied: %s" % resp.message + "
" + str(resp.data)
+ return f"Access denied: {resp.message}
{resp.data}"
session["zeus_token"] = (resp["access_token"], "")
me = current_app.zeus.get("current_user/")