Get group name from the new db
(grp)
| 134 | |
| 135 | groupnames = {} |
| 136 | def getgroupname(grp): |
| 137 | """Get group name from the new db""" |
| 138 | if grp in groupnames: |
| 139 | name = groupnames[grp] |
| 140 | else: |
| 141 | query = 'SELECT name FROM invgroups WHERE groupID = ?' |
| 142 | new_cursor.execute(query, (grp,)) |
| 143 | name = "" |
| 144 | for row in new_cursor: |
| 145 | name = row[0] |
| 146 | if not name: |
| 147 | old_cursor.execute(query, (grp,)) |
| 148 | for row in old_cursor: |
| 149 | name = row[0] |
| 150 | groupnames[grp] = name |
| 151 | return name |
| 152 | |
| 153 | effectnames = {} |
| 154 | def geteffectname(effect): |