MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / getattrname

Function getattrname

scripts/itemDiff.py:172–187  ·  view source on GitHub ↗

Get attribute name from the new db

(attr)

Source from the content-addressed store, hash-verified

170
171 attrnames = {}
172 def getattrname(attr):
173 """Get attribute name from the new db"""
174 if attr in attrnames:
175 name = attrnames[attr]
176 else:
177 query = 'SELECT attributeName FROM dgmattribs WHERE attributeID = ?'
178 new_cursor.execute(query, (attr,))
179 name = ""
180 for row in new_cursor:
181 name = row[0]
182 if not name:
183 old_cursor.execute(query, (attr,))
184 for row in old_cursor:
185 name = row[0]
186 attrnames[attr] = name
187 return name
188
189 # State table
190 S = {"unchanged": 0,

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected