fedora-accounts export-bugzilla.py,1.7,1.8

Jeremy Katz (katzj) fedora-extras-commits at redhat.com
Mon Jul 2 15:36:32 UTC 2007


Author: katzj

Update of /cvs/fedora/fedora-accounts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30629

Modified Files:
	export-bugzilla.py 
Log Message:
use the actual variable...



Index: export-bugzilla.py
===================================================================
RCS file: /cvs/fedora/fedora-accounts/export-bugzilla.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- export-bugzilla.py	2 Jul 2007 15:33:43 -0000	1.7
+++ export-bugzilla.py	2 Jul 2007 15:36:23 -0000	1.8
@@ -102,17 +102,17 @@
 	    continue
 
     user_email = arow[2].lower()
-    bzdbc.execute("SELECT userid FROM profiles WHERE login_name = %s", (arow[2],))
+    bzdbc.execute("SELECT userid FROM profiles WHERE login_name = %s", (user_email,))
     if not bzdbc.rowcount:
-        print "Creating BZ account for", arow[2]
-        bzdbc.execute("INSERT INTO profiles (userid, login_name, cryptpassword, realname, mybugslink, refreshed_when) VALUES (nextval('profiles_userid_seq'), %s, %s, %s, 1, NOW())", (arow[2], crypt.crypt(arow[3], 'aq'), arow[5]))
-        bzdbc.execute("SELECT userid FROM profiles WHERE login_name = %s", (arow[2],))
+        print "Creating BZ account for", user_email
+        bzdbc.execute("INSERT INTO profiles (userid, login_name, cryptpassword, realname, mybugslink, refreshed_when) VALUES (nextval('profiles_userid_seq'), %s, %s, %s, 1, NOW())", (user_email, crypt.crypt(arow[3], 'aq'), arow[5]))
+        bzdbc.execute("SELECT userid FROM profiles WHERE login_name = %s", (user_email,))
         assert bzdbc.rowcount
     bz_user_id = bzdbc.fetchone()[0]
 
     bzdbc.execute("SELECT user_id FROM user_group_map WHERE user_id = %s AND group_id = %s", (bz_user_id, bz_group_id))
     if not bzdbc.rowcount:
-#        print "Adding membership for", arow[2]
+#        print "Adding membership for", user_email
         bzdbc.execute("INSERT INTO user_group_map (user_id, group_id, isbless, isderived, grant_type) VALUES (%s, %s, 0, 0, %s)",
                       (bz_user_id, bz_group_id, GRANT_DIRECT))
 	checkme[bz_user_id] = user_email




More information about the scm-commits mailing list