Dont output an error when none is used as a modifier

This commit is contained in:
Kovid Goyal 2021-04-18 18:11:56 +05:30
parent fe291dd769
commit 50f8aeeaf6
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -53,7 +53,8 @@ def map_mod(m: str) -> str:
try:
mods |= getattr(defines, 'GLFW_MOD_' + map_mod(m.upper()))
except AttributeError:
log_error('Shortcut: {} has unknown modifier, ignoring'.format(sc))
if m.upper() != 'NONE':
log_error('Shortcut: {} has unknown modifier, ignoring'.format(sc))
return None
return mods