Browse Source

fix Enum crash

Darren Ranalli 21 years ago
parent
commit
201eedf7bc
1 changed files with 3 additions and 0 deletions
  1. 3 0
      direct/src/showbase/PythonUtil.py

+ 3 - 0
direct/src/showbase/PythonUtil.py

@@ -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