genxml: use the isalpha method rather than str.isalpha.
authorDylan Baker <dylan@pnwbakers.com>
Tue, 31 May 2016 20:33:50 +0000 (13:33 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 31 May 2016 22:09:06 +0000 (15:09 -0700)
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>

src/intel/genxml/gen_pack_header.py

index 876d6097206c614d4ecf588c8621a0713e3cbe19..99452728b8437f10cd7bb14169b63a7359aa0538 100644 (file)
@@ -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