From 12c1a01c720f4e9fa16345ee403ac061ed40601e Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 31 May 2016 13:33:50 -0700 Subject: [PATCH] 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 --- src/intel/genxml/gen_pack_header.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2