genxml: use the isalpha method rather than str.isalpha.
This fixes gen_pack_header to work on python 2, where name[0] is unicode not str. Signed-off-by: Dylan Bake <dylanx.c.baker@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> cc: 12.0 <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
a45a25418b
commit
12c1a01c72
|
@ -201,7 +201,7 @@ def to_alphanum(name):
|
|||
|
||||
def safe_name(name):
|
||||
name = to_alphanum(name)
|
||||
if not str.isalpha(name[0]):
|
||||
if not name[0].isalpha():
|
||||
name = '_' + name
|
||||
|
||||
return name
|
||||
|
|
Loading…
Reference in New Issue