[Rivet-svn] rivet: Fix --show-analysis properly

Rivet Mercurial rivet at projects.hepforge.org
Fri Nov 17 19:30:02 GMT 2017


details:   https://rivet.hepforge.org/hg/rivet/rev/8eb1b74adbfd
branches:  
changeset: 6148:8eb1b74adbfd
user:      David Grellscheid <david.grellscheid at durham.ac.uk>
date:      Fri Nov 17 19:22:40 2017 +0000
description:
Fix --show-analysis properly

diffs (26 lines):

--- a/bin/rivet	Fri Nov 17 18:56:45 2017 +0000
+++ b/bin/rivet	Fri Nov 17 19:22:40 2017 +0000
@@ -221,7 +221,9 @@
                             msg += "  [" + " ".join(a.keywords()) + "]"
                         if a.luminosityfb():
                             msg += "  [ \int L = %s fb^{-1} ]"%a.luminosityfb()
-                print(msg.encode('utf-8'))
+                if type(u'') is not str:
+                    msg = msg.encode('utf-8')
+                print(msg)
                 #os.write(tf, msg + "\n")
         # if os.path.getsize(tfpath) > 0:
         #     pager = subprocess.Popen(["less", "-FX", tfpath]) #, stdin=subprocess.PIPE)
--- a/test/testCmdLine.sh	Fri Nov 17 18:56:45 2017 +0000
+++ b/test/testCmdLine.sh	Fri Nov 17 19:22:40 2017 +0000
@@ -43,6 +43,10 @@
 echo
 rivet --list-analyses > log || exit $?
 
+# this analysis has greek chars in the name
+echo
+rivet --show-analysis SLD_1999_S37439 > log || exit $?
+
 echo
 rivet -a D0_2008_S7554427 ${RIVET_TESTS_SRC}/testApi.hepmc file2.hepmc > log || exit $?
 grep -q "20 events" log


More information about the Rivet-svn mailing list