Skip to content

Commit 7fa8096

Browse files
authored
Added support for the new Enum changes in Python 3.12. (#517)
Fix #516 issues.
1 parent 8db1d02 commit 7fa8096

File tree

1 file changed

+1
-1
lines changed
  • addons/source-python/packages/source-python/weapons

1 file changed

+1
-1
lines changed

addons/source-python/packages/source-python/weapons/instance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def parse_weapon_constants(value, weapon_constants):
190190
if isinstance(value, int):
191191
try:
192192
return weapon_constants(value)
193-
except ValueError:
193+
except (ValueError, TypeError):
194194
pass
195195
elif isinstance(value, str):
196196
try:

0 commit comments

Comments
 (0)