From d1c78be38fd8990f0990ebfe0702b037036b7f41 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Fri, 9 Aug 2013 13:55:13 +0200 Subject: fixed ws handler --- pyload/remote/wsbackend/AbstractHandler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pyload') 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) -- cgit v1.2.3