Skip to contentSkip to conversation

mesa-dri_8.0.4.bbappend: Remove tabs from python code

PATCH In review Khem Raj 2 participants 2 messages Nov 21, 2012 – Nov 22, 2012

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/1 mesa-dri_8.0.4.bbappend: Remove tabs from python code

check for xserver to be non-empty before using it
fixed errors like

ERROR: Failed to parse recipe:
/b/kraj/yocto/poky/meta/recipes-graphics/mesa/mesa-dri_8.0.4.bb
ERROR: Error executing a python function in <code>:
AttributeError: 'NoneType' object has no attribute 'split'

---
 .../recipes-graphics/mesa/mesa-dri_8.0.4.bbappend  |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
common/recipes-graphics/mesa/mesa-dri_8.0.4.bbappend +4 -4
index 6bfa968..b92831d 100644
@@ -6,13 +6,13 @@
 python __anonymous () {
     import re
     xserver = d.getVar('XSERVER', True)
-    if 'emgd-driver-bin' in xserver.split(' '):
+    if xserver and 'emgd-driver-bin' in xserver.split(' '):
         extra_oeconf = d.getVar('EXTRA_OECONF', True).split()
-	take_out = ["--enable-egl", "--enable-gles1", "--enable-gles2"]
-	put_in = ["--disable-egl", "--disable-gles1", "--disable-gles2"]
+        take_out = ["--enable-egl", "--enable-gles1", "--enable-gles2"]
+        put_in = ["--disable-egl", "--disable-gles1", "--disable-gles2"]
         pattern = re.compile("--with-egl-platforms")
         new_extra_oeconf = [ ]
-	for i in extra_oeconf:
+        for i in extra_oeconf:
             if ( i not in take_out ) and ( not pattern.match(i)):
                 new_extra_oeconf.append(i)
         for i in put_in:
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 9 lines · Khem Raj

check for xserver to be non-empty before using it
fixed errors like

ERROR: Failed to parse recipe:
/b/kraj/yocto/poky/meta/recipes-graphics/mesa/mesa-dri_8.0.4.bb
ERROR: Error executing a python function in <code>:
AttributeError: 'NoneType' object has no attribute 'split'

Pulled into meta-intel/master and meta-intel/danny-next.

Thanks,

Tom

Quoted 26 lines
---
 .../recipes-graphics/mesa/mesa-dri_8.0.4.bbappend  |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
common/recipes-graphics/mesa/mesa-dri_8.0.4.bbappend +4 -4
index 6bfa968..b92831d 100644
@@ -6,13 +6,13 @@
 python __anonymous () {
     import re
     xserver = d.getVar('XSERVER', True)
-    if 'emgd-driver-bin' in xserver.split(' '):
+    if xserver and 'emgd-driver-bin' in xserver.split(' '):
         extra_oeconf = d.getVar('EXTRA_OECONF', True).split()
-	take_out = ["--enable-egl", "--enable-gles1", "--enable-gles2"]
-	put_in = ["--disable-egl", "--disable-gles1", "--disable-gles2"]
+        take_out = ["--enable-egl", "--enable-gles1", "--enable-gles2"]
+        put_in = ["--disable-egl", "--disable-gles1", "--disable-gles2"]
         pattern = re.compile("--with-egl-platforms")
         new_extra_oeconf = [ ]
-	for i in extra_oeconf:
+        for i in extra_oeconf:
             if ( i not in take_out ) and ( not pattern.match(i)):
                 new_extra_oeconf.append(i)
         for i in put_in: