From 10843cbca262a6cede65b4fda54bcfa6a5f17316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez?= Date: Tue, 19 Mar 2013 15:00:30 +0000 Subject: [PATCH] now getValidGroups returns a generator, not a list, so it does not have len :-) --- server/src/uds/auths/IP/Authenticator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/uds/auths/IP/Authenticator.py b/server/src/uds/auths/IP/Authenticator.py index 826c3dd3..8d61bec2 100644 --- a/server/src/uds/auths/IP/Authenticator.py +++ b/server/src/uds/auths/IP/Authenticator.py @@ -109,7 +109,7 @@ class IPAuth(Authenticator): # doAutoLogin = Config.section('IPAUTH').value('autoLogin', '0').getBool() gm = GroupsManager(self.dbAuthenticator()) self.getGroups(request.ip, gm) - if len(gm.getValidGroups()) > 0 and self.dbAuthenticator().isValidUser(request.ip, True): + if len(list(gm.getValidGroups())) > 0 and self.dbAuthenticator().isValidUser(request.ip, True): passw = ''.join(random.choice(string.letters + string.digits) for __ in xrange(12)) self.cache().put(request.ip, passw) return ''