Ticket #8229: bugzilla2trac.diff
| File bugzilla2trac.diff, 1.1 KB (added by maarten.ter.huurne@…, 3 years ago) |
|---|
-
bugzilla2trac.py
old new 532 539 trac.db().commit() 533 540 534 541 c.execute("DELETE FROM attachment") 535 attachments_dir = os.path.join(os.path.normpath(trac.env.path),542 attachments_dir = os.path.join(os.path.normpath(trac.env.path), 536 543 "attachments") 537 544 # Straight from the Python documentation. 538 545 for root, dirs, files in os.walk(attachments_dir, topdown=False): … … 902 909 trac.addAttachment(author, a) 903 910 904 911 print "\n8. Importing users and passwords..." 905 if BZ_VERSION >= 216 7:912 if BZ_VERSION >= 2164: 906 913 selectlogins = "SELECT login_name, cryptpassword FROM profiles"; 907 914 if IGNORE_DISABLED_USERS: 908 915 selectlogins = selectlogins + " WHERE disabledtext=''" 909 916 mysql_cur.execute(selectlogins) 910 917 users = mysql_cur.fetchall() 918 else: 919 users = () 911 920 htpasswd = file("htpasswd", 'w') 912 921 for user in users: 913 922 if LOGIN_MAP.has_key(user['login_name']):
