diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-04-27 02:09:26 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-04-27 02:09:26 +0200 |
commit | 89cf405ab970c4e289b7b79485b27aed8edb1a41 (patch) | |
tree | 7f6330fb7b9bab82a84aeb2a639377b9c4fe1d80 /pyaggr3g470r/decorators.py | |
parent | This fixes #3. (diff) | |
download | newspipe-89cf405ab970c4e289b7b79485b27aed8edb1a41.tar.gz newspipe-89cf405ab970c4e289b7b79485b27aed8edb1a41.tar.bz2 newspipe-89cf405ab970c4e289b7b79485b27aed8edb1a41.zip |
Cleaned code.
Diffstat (limited to 'pyaggr3g470r/decorators.py')
-rw-r--r-- | pyaggr3g470r/decorators.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pyaggr3g470r/decorators.py b/pyaggr3g470r/decorators.py index 565d25a6..a32e9709 100644 --- a/pyaggr3g470r/decorators.py +++ b/pyaggr3g470r/decorators.py @@ -8,16 +8,19 @@ from flask import g, redirect, url_for, flash from pyaggr3g470r.models import Feed + def async(f): def wrapper(*args, **kwargs): - thr = Thread(target = f, args = args, kwargs = kwargs) + thr = Thread(target=f, args=args, kwargs=kwargs) thr.start() return wrapper + def feed_access_required(func): """ This decorator enables to check if a user has access to a feed. - The administrator of the platform is able to access to the feeds of a normal user. + The administrator of the platform is able to access to the feeds + of a normal user. """ @wraps(func) def decorated(*args, **kwargs): |