Commit 3537561d authored by Denis Bilenko's avatar Denis Bilenko

core.ppyx: ignore empty strings in _flags_to_int

parent d6e88662
......@@ -152,7 +152,9 @@ cpdef unsigned int _flags_to_int(object flags) except? -1:
if isinstance(flags, basestring):
flags = flags.split(',')
for value in flags:
result |= _flags_str2int[value.strip().lower()]
value = value.strip().lower()
if value:
result |= _flags_str2int[value]
except KeyError, ex:
raise ValueError('Invalid backend or flag: %s\nPossible values: %s' % (ex, ', '.join(sorted(_flags_str2int.keys()))))
return result
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment