aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/decorators.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r/decorators.py')
-rw-r--r--pyaggr3g470r/decorators.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pyaggr3g470r/decorators.py b/pyaggr3g470r/decorators.py
index a13dacac..9bae626d 100644
--- a/pyaggr3g470r/decorators.py
+++ b/pyaggr3g470r/decorators.py
@@ -1,5 +1,5 @@
#! /usr/bin/env python
-#-*- coding: utf-8 -*-
+# -*- coding: utf-8 -*-
from threading import Thread
from functools import wraps
@@ -23,6 +23,7 @@ def async(f):
thr.start()
return wrapper
+
def feed_access_required(func):
"""
This decorator enables to check if a user has access to a feed.
@@ -47,7 +48,7 @@ def handle_pyagg_error(func):
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
- except PyAggError, error:
+ except PyAggError as error:
flash(gettext(error.default_message), 'warning')
return redirect(url_for('home'))
return wrapper
bgstack15