server/sources/native.py
branchstable
changeset 1954 9b20f3504af8
parent 1952 8e19c813750d
child 1977 606923dff11b
--- a/server/sources/native.py	Wed May 27 11:24:58 2009 +0200
+++ b/server/sources/native.py	Wed May 27 11:26:03 2009 +0200
@@ -241,7 +241,7 @@
                 pwd = rset[0][0]
             except IndexError:
                 raise AuthenticationError('bad login')
-            # passwords are stored using the bytea type, so we get a StringIO
+            # passwords are stored using the Bytes type, so we get a StringIO
             if pwd is not None:
                 args['pwd'] = crypt_password(password, pwd.getvalue()[:2])
         # get eid from login and (crypted) password
@@ -481,8 +481,7 @@
         try:
             result = cursor.fetchone()
             if result:
-                eid = result[0]
-                return eid
+                return result[0]
         except:
             pass
         return None