From 37b15872de34004f691cef64cfcb5db36fce0ec0 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 25 Feb 2003 02:40:27 +0000 Subject: [PATCH] check return value of os.system() (unfortunately, this works only on unix) --- direct/src/directscripts/make-panda3d-tgz.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/direct/src/directscripts/make-panda3d-tgz.py b/direct/src/directscripts/make-panda3d-tgz.py index 9ea1888b5e..d34121c9b0 100755 --- a/direct/src/directscripts/make-panda3d-tgz.py +++ b/direct/src/directscripts/make-panda3d-tgz.py @@ -81,7 +81,8 @@ else: print 'Checking out "%s" as "%s".' % (MODULE, basename) cmd = 'cvs -z3 -f -d "%s" export -r "%s" -d "%s" "%s"' % (CVSROOT, tag, basename, MODULE) -os.system(cmd) +if os.system(cmd) != 0: + sys.exit(1) # Move the contents of the doc module into the root directory where people # will expect to see it. @@ -95,12 +96,14 @@ if os.path.exists(docdir): # Generate the tarball. cmd = 'tar cvzf "%s" "%s"' % (tarfile, basename) -os.system(cmd) +if os.system(cmd) != 0: + sys.exit(1) # Also generate a .zip file. if os.path.exists(zipfile): os.remove(zipfile) cmd = 'zip -9r "%s" "%s"' % (zipfile, basename) -os.system(cmd) +if os.system(cmd) != 0: + sys.exit(1) shutil.rmtree(basename)