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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 07, 2014 at 11:56:54AM +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
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()])


ACK.

This actually raises a DistutilsExecError which is properly handled
"upstairs" in the Command class.

Martin

class my_test(Command):
    user_options = [
--
2.0.4




--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]