[Python-checkins] python/dist/src/Doc/tools mkhowto,1.38,1.39

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
Tue, 13 May 2003 21:16:17 -0700


Update of /cvsroot/python/python/dist/src/Doc/tools
In directory sc8-pr-cvs1:/tmp/cvs-serv6616

Modified Files:
	mkhowto 
Log Message:
When an external application we use exits normally, exit with the same
exit code they returned.  All other types of exit from child processes
are normalized to a return code of 1.
Closes SF bug #732143.


Index: mkhowto
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkhowto,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** mkhowto	17 Jan 2003 21:25:04 -0000	1.38
--- mkhowto	14 May 2003 04:16:14 -0000	1.39
***************
*** 526,532 ****
                  "Session transcript and error messages are in %s."
                  % self.log_filename)
              if hasattr(os, "WIFEXITED"):
                  if os.WIFEXITED(rc):
!                     self.warning("Exited with status %s." % os.WEXITSTATUS(rc))
                  else:
                      self.warning("Killed by signal %s." % os.WSTOPSIG(rc))
--- 526,534 ----
                  "Session transcript and error messages are in %s."
                  % self.log_filename)
+             result = 1
              if hasattr(os, "WIFEXITED"):
                  if os.WIFEXITED(rc):
!                     result = os.WEXITSTATUS(rc)
!                     self.warning("Exited with status %s." % result)
                  else:
                      self.warning("Killed by signal %s." % os.WSTOPSIG(rc))
***************
*** 536,540 ****
              sys.stderr.write("-" * 72 + "\n")
              sys.stderr.writelines(get_run_transcript(self.log_filename))
!             sys.exit(rc)
  
      def message(self, msg):
--- 538,542 ----
              sys.stderr.write("-" * 72 + "\n")
              sys.stderr.writelines(get_run_transcript(self.log_filename))
!             sys.exit(result)
  
      def message(self, msg):