[Mesa-dev] [PATCH v2] genxml: use the isalpha method rather than str.isalpha.
Dylan Baker
dylan at pnwbakers.com
Tue May 31 21:42:28 UTC 2016
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 at intel.com>
---
v2: - remove extra newline
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 ee0b6c2..01f20ad 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.8.3
More information about the mesa-dev
mailing list