[Mesa-stable] [PATCH 6/7] genxml: use the isalpha method rather than str.isalpha.
Dylan Baker
dylan at pnwbakers.com
Tue May 31 21:30:29 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>
---
src/intel/genxml/gen_pack_header.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/intel/genxml/gen_pack_header.py b/src/intel/genxml/gen_pack_header.py
index 468bfea..5ef6744 100644
--- a/src/intel/genxml/gen_pack_header.py
+++ b/src/intel/genxml/gen_pack_header.py
@@ -9,6 +9,7 @@ import re
import sys
import copy
+
license = """/*
* Copyright (C) 2016 Intel Corporation
*
@@ -203,7 +204,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-stable
mailing list