summaryrefslogtreecommitdiffstats
path: root/pyload
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-08-09 13:55:13 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-08-09 13:55:13 +0200
commitd1c78be38fd8990f0990ebfe0702b037036b7f41 (patch)
tree99239d364615b21915aa4d710a572a7fbc1cbe56 /pyload
parentimproved last fix (diff)
downloadpyload-d1c78be38fd8990f0990ebfe0702b037036b7f41.tar.xz
fixed ws handler
Diffstat (limited to 'pyload')
-rw-r--r--pyload/remote/wsbackend/AbstractHandler.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pyload/remote/wsbackend/AbstractHandler.py b/pyload/remote/wsbackend/AbstractHandler.py
index f540435c4..cad749ff8 100644
--- a/pyload/remote/wsbackend/AbstractHandler.py
+++ b/pyload/remote/wsbackend/AbstractHandler.py
@@ -121,11 +121,12 @@ class AbstractHandler:
# Cookies login when one argument is given
if len(args) == 1:
s = self.load_session(args)
+ if s:
+ user = User(uid=s.get('uid', None))
else:
s = self.api.checkAuth(*args, **kwargs)
if s:
- uid = s.get('uid', None)
- user = User(uid=uid)
+ user = User(uid=s.uid)
if user:
req.api = self.api.withUserContext(user.uid)