[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] away with add_database_user



Signed-off-by: Joerg Jaspert <joerg@debian.org>
---
 dak/add_user.py  |    3 +--
 daklib/dbconn.py |   22 ----------------------
 2 files changed, 1 insertions(+), 24 deletions(-)

diff --git a/dak/add_user.py b/dak/add_user.py
index 28d3120..f658272 100755
--- a/dak/add_user.py
+++ b/dak/add_user.py
@@ -22,7 +22,7 @@ import sys
 import apt_pkg
 
 from daklib import utils
-from daklib.dbconn import DBConn, add_database_user, get_or_set_uid
+from daklib.dbconn import DBConn, get_or_set_uid
 from daklib.regexes import re_gpg_fingerprint, re_user_address, re_user_mails, re_user_name
 
 ################################################################################
@@ -198,7 +198,6 @@ def main():
         # Note that we provide a session, so we're responsible for committing
         uidobj = get_or_set_uid(uid, session=session)
         uid_id = uidobj.uid_id
-        add_database_user(uid)
         session.commit()
 
         # The following two are kicked out in rhona, so we don't set them. kelly adds
diff --git a/daklib/dbconn.py b/daklib/dbconn.py
index a1bff89..636b8e3 100755
--- a/daklib/dbconn.py
+++ b/daklib/dbconn.py
@@ -2656,28 +2656,6 @@ class Uid(object):
 __all__.append('Uid')
 
 @session_wrapper
-def add_database_user(uidname, session=None):
-    """
-    Adds a database user
-
-    @type uidname: string
-    @param uidname: The uid of the user to add
-
-    @type session: SQLAlchemy
-    @param session: Optional SQL session object (a temporary one will be
-    generated if not supplied).  If not passed, a commit will be performed at
-    the end of the function, otherwise the caller is responsible for commiting.
-
-    @rtype: Uid
-    @return: the uid object for the given uidname
-    """
-
-    session.execute("CREATE USER :uid", {'uid': uidname})
-    session.commit_or_flush()
-
-__all__.append('add_database_user')
-
-@session_wrapper
 def get_or_set_uid(uidname, session=None):
     """
     Returns uid object for given uidname.
-- 
1.5.6.5


Reply to: