[Rivet-svn] rivet: Python 3 fix for the python 2 fix in 6c480a0d835c

Rivet Mercurial rivet at projects.hepforge.org
Tue May 22 17:45:01 BST 2018


details:   https://rivet.hepforge.org/hg/rivet/rev/41c0cbc7c95d
branches:  multiweight
changeset: 6300:41c0cbc7c95d
user:      David Grellscheid <david.grellscheid at durham.ac.uk>
date:      Tue May 22 17:39:07 2018 +0100
description:
Python 3 fix for the python 2 fix in 6c480a0d835c

diffs (12 lines):

--- a/doc/mk-analysis-html	Tue May 22 17:25:56 2018 +0100
+++ b/doc/mk-analysis-html	Tue May 22 17:39:07 2018 +0100
@@ -190,7 +190,8 @@
             page += "<b><kbd>%s</kbd></b>\n" % os.path.basename(cc)
             with open(cc, 'r') as f:
                 src = f.read()
-                src = src.decode("UTF-8")
+                if type(u'') != str:
+                    src = src.decode("UTF-8")
             try:
                 import pygments
                 from pygments.lexers import get_lexer_by_name


More information about the Rivet-svn mailing list