[libvirt] [libvirt-python PATCH] setup.py: fix rpm build to return 1 on error

Pavel Hrdina phrdina at redhat.com
Tue Oct 7 09:56:54 UTC 2014


Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 setup.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/setup.py b/setup.py
index 0c34ae1..c6a9ce3 100755
--- a/setup.py
+++ b/setup.py
@@ -245,8 +245,8 @@ class my_rpm(Command):
         """
 
         self.run_command('sdist')
-        os.system('rpmbuild -ta --clean dist/libvirt-python-%s.tar.gz' %
-                  self.distribution.get_version())
+        self.spawn(["/usr/bin/rpmbuild", "-ta", "--clean",
+            "dist/libvirt-python-%s.tar.gz" % self.distribution.get_version()])
 
 class my_test(Command):
     user_options = [
-- 
2.0.4




More information about the libvir-list mailing list