use os.system to fix command full path issue
authorZhang Qiang <qiang.z.zhang@intel.com>
Mon, 4 Jun 2012 06:39:40 +0000 (14:39 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Sat, 9 Jun 2012 14:10:52 +0000 (22:10 +0800)
gitbuildsys/utils.py

index 21d22d4..12ac735 100644 (file)
@@ -339,8 +339,8 @@ def setup_qemu_emulator():
             os.write(tmpfd, "echo '%s' > /proc/sys/fs/binfmt_misc/register" % qemu_arm_string)
             os.close(tmpfd)
             # on this way can work to use sudo register qemu emulator
-            ret = subprocess.call('sudo sh %s' % tmppth)
-            if ret:
+            ret = os.system('sudo sh %s' % tmppth)
+            if ret != 0:
                 raise errors.QemuError('failed to set up qemu arm environment')
         except IOError:
             raise errors.QemuError('failed to set up qemu arm environment')