summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2016-05-31 13:33:50 -0700
committerDylan Baker <dylan@pnwbakers.com>2016-05-31 14:45:32 -0700
commitc4ac1642dd1efa0d8befc7a585343eea7b63c1a4 (patch)
tree2a30b217dde4aa9ff518e46bb2fb18268a898174
parentffe96a071f4a6d479bf899e4258eb269fab92ede (diff)
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>
-rw-r--r--src/intel/genxml/gen_pack_header.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/genxml/gen_pack_header.py b/src/intel/genxml/gen_pack_header.py
index 876d609720..99452728b8 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