Fix pyslha.ParseError printout to be more helpful. pyslha-1.3.3

Sat, 03 Mar 2012 20:38:14 +0100

author
Andy Buckley <andy@insectnation.org>
date
Sat, 03 Mar 2012 20:38:14 +0100
changeset 168
9736876969a4
parent 167
e9ced0cd7b60
child 169
16b19524fde3

Fix pyslha.ParseError printout to be more helpful.

ChangeLog file | annotate | diff | comparison | revisions
pyslha.py file | annotate | diff | comparison | revisions
slhaplot file | annotate | diff | comparison | revisions
     1.1 --- a/ChangeLog	Sat Mar 03 20:32:21 2012 +0100
     1.2 +++ b/ChangeLog	Sat Mar 03 20:38:14 2012 +0100
     1.3 @@ -1,5 +1,9 @@
     1.4  2012-03-03  Andy Buckley  <andy.buckley@cern.ch>
     1.5  
     1.6 +	* Version 1.3.3
     1.7 +
     1.8 +	* Fix pyslha.ParseError printout to be more helpful.
     1.9 +
    1.10  	* Version 1.3.2
    1.11  
    1.12  	* Improving error handling if tex2pix cannot be found or the MASS
     2.1 --- a/pyslha.py	Sat Mar 03 20:32:21 2012 +0100
     2.2 +++ b/pyslha.py	Sat Mar 03 20:38:14 2012 +0100
     2.3 @@ -50,7 +50,7 @@
     2.4      "Exception object to be raised when a spectrum file/string is malformed"
     2.5      def __init__(self, errmsg):
     2.6          self.msg = errmsg
     2.7 -    def __repr__(self):
     2.8 +    def __str__(self):
     2.9          return self.msg
    2.10  
    2.11  
     3.1 --- a/slhaplot	Sat Mar 03 20:32:21 2012 +0100
     3.2 +++ b/slhaplot	Sat Mar 03 20:38:14 2012 +0100
     3.3 @@ -264,9 +264,8 @@
     3.4          else:
     3.5              BLOCKS, DECAYS = pyslha.readSLHAFile(infile)
     3.6      except pyslha.ParseError, pe:
     3.7 -        logging.error(pe)
     3.8 +        logging.error(str(pe) + "... exiting")
     3.9          sys.exit(1)
    3.10 -    # print BLOCKS
    3.11  
    3.12  
    3.13      ## Define particle rendering details (may be adapted based on input file, so it *really*

mercurial