mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
fix Enum crash
This commit is contained in:
parent
2504d41baa
commit
201eedf7bc
@ -1001,6 +1001,9 @@ class Enum:
|
||||
for item in items:
|
||||
# remove leading/trailing whitespace
|
||||
item = string.strip(item)
|
||||
# is there anything left?
|
||||
if len(item) == 0:
|
||||
continue
|
||||
# make sure there are no invalid characters
|
||||
assert(Enum._checkValidIdentifier(item))
|
||||
self.__dict__[item] = i
|
||||
|
Loading…
x
Reference in New Issue
Block a user