From: Dylan Baker Date: Tue, 31 May 2016 20:33:50 +0000 (-0700) Subject: genxml: use the isalpha method rather than str.isalpha. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=12c1a01c720f4e9fa16345ee403ac061ed40601e;p=mesa.git 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 Reviewed-by: Jason Ekstrand cc: 12.0 --- diff --git a/src/intel/genxml/gen_pack_header.py b/src/intel/genxml/gen_pack_header.py index 876d6097206..99452728b84 100644 --- a/src/intel/genxml/gen_pack_header.py +++ b/src/intel/genxml/gen_pack_header.py @@ -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