You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File ".../config/utils.py", line 42, in processHotKeys
File ".../config/utils.py", line 37, in
File ".../config/utils.py", line 32, in
AttributeError: 'module' object has no attribute 'KEY__'
def processHotKeys(data, keys, mode):
add = lambda key: key if 'KEY_' in key else 'KEY_' + key
if mode == 'read':
process = lambda key: getattr(Keys, add(key))
elif mode == 'write':
process = lambda key: SPECIAL_TO_KEYS.get(key) or add(BigWorld.keyToString(key))
else:
assert False, 'unknown hotkey conversion mode'
make = lambda keySet: [make(key) if isinstance(key, (list, tuple)) else process(key) for key in keySet]
for dataKey in keys: # configs have 'Key', code checks for 'key'. >_<
newKey = dataKey.replace('key', 'Key')
if (newKey if mode == 'read' else dataKey) not in data:
continue
data[(dataKey if mode == 'read' else newKey)] = make(data.pop((newKey if mode == 'read' else dataKey)))
The text was updated successfully, but these errors were encountered:
File ".../config/utils.py", line 42, in processHotKeys
File ".../config/utils.py", line 37, in
File ".../config/utils.py", line 32, in
AttributeError: 'module' object has no attribute 'KEY__'
def processHotKeys(data, keys, mode):
add = lambda key: key if 'KEY_' in key else 'KEY_' + key
if mode == 'read':
process = lambda key: getattr(Keys, add(key))
elif mode == 'write':
process = lambda key: SPECIAL_TO_KEYS.get(key) or add(BigWorld.keyToString(key))
else:
assert False, 'unknown hotkey conversion mode'
make = lambda keySet: [make(key) if isinstance(key, (list, tuple)) else process(key) for key in keySet]
for dataKey in keys: # configs have 'Key', code checks for 'key'. >_<
newKey = dataKey.replace('key', 'Key')
if (newKey if mode == 'read' else dataKey) not in data:
continue
data[(dataKey if mode == 'read' else newKey)] = make(data.pop((newKey if mode == 'read' else dataKey)))
The text was updated successfully, but these errors were encountered: