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:
Dylan Baker 2016-05-31 13:33:50 -07:00 committed by Jason Ekstrand
parent a45a25418b
commit 12c1a01c72
1 changed files with 1 additions and 1 deletions

View File

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