[Rivet-svn] rivet: Specialise return error codes from the rivet script.

Rivet Mercurial rivet at projects.hepforge.org
Wed May 11 23:00:02 BST 2016


details:   https://rivet.hepforge.org/hg/rivet/rev/4a1dbbad99a3
branches:  release-2-4-x
changeset: 5204:4a1dbbad99a3
user:      Andy Buckley <andy at insectnation.org>
date:      Wed May 11 22:59:21 2016 +0100
description:
Specialise return error codes from the rivet script.

diffs (41 lines):

--- a/ChangeLog	Wed May 11 22:12:05 2016 +0100
+++ b/ChangeLog	Wed May 11 22:59:21 2016 +0100
@@ -1,6 +1,9 @@
+2016-05-11  Andy Buckley  <andy.buckley at cern.ch>
+
+	* Specialise return error codes from the rivet script.
+
 2016-05-05  Andy Buckley  <andy.buckley at cern.ch>
 
-
 	* Version 2.4.2 release!
 
 	* Update SLD_2002_S4869273 ref data to match publication erratum,
--- a/bin/rivet	Wed May 11 22:12:05 2016 +0100
+++ b/bin/rivet	Wed May 11 22:59:21 2016 +0100
@@ -32,7 +32,7 @@
         import rivet
     except:
         sys.stderr.write("The rivet Python module could not be loaded: is your PYTHONPATH set correctly?\n")
-        sys.exit(1)
+        sys.exit(5)
 
 rivet.util.check_python_version()
 rivet.util.set_process_name("rivet")
@@ -404,14 +404,12 @@
 
 ## Do some checks on output histo file, before we stat the event loop
 histo_parentdir = os.path.dirname(os.path.abspath(opts.HISTOFILE))
-
 if not os.path.exists(histo_parentdir):
   logging.error('Parent path of output histogram file does not exist: %s\nExiting.' % histo_parentdir)
-  sys.exit(1)
-
+  sys.exit(4)
 if not os.access(histo_parentdir,os.W_OK):
   logging.error('Insufficient permissions to write output histogram file to directory %s\nExiting.' % histo_parentdir)
-  sys.exit(1)
+  sys.exit(4)
 
 
 ## Set up analysis handler


More information about the Rivet-svn mailing list