--- bugzilla2trac.py.org	2009-07-23 18:54:04.000000000 +0200
+++ bugzilla2trac.py	2009-05-05 13:36:04.000000000 +0200
@@ -532,7 +539,7 @@
         trac.db().commit()

         c.execute("DELETE FROM attachment")
-	attachments_dir = os.path.join(os.path.normpath(trac.env.path),
+        attachments_dir = os.path.join(os.path.normpath(trac.env.path),
                                 "attachments")
         # Straight from the Python documentation.
         for root, dirs, files in os.walk(attachments_dir, topdown=False):
@@ -902,12 +909,14 @@
             trac.addAttachment(author, a)

     print "\n8. Importing users and passwords..."
-    if BZ_VERSION >= 2167:
+    if BZ_VERSION >= 2164:
         selectlogins = "SELECT login_name, cryptpassword FROM profiles";
         if IGNORE_DISABLED_USERS:
             selectlogins = selectlogins + " WHERE disabledtext=''"
         mysql_cur.execute(selectlogins)
         users = mysql_cur.fetchall()
+    else:
+        users = ()
     htpasswd = file("htpasswd", 'w')
     for user in users:
         if LOGIN_MAP.has_key(user['login_name']):

