diff options
author | Peter Scheibel <scheibel1@llnl.gov> | 2015-10-23 20:56:06 -0700 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2015-10-23 20:56:06 -0700 |
commit | cc0ee3dc29516d6ceb49c4144fa3cb75d0120b0d (patch) | |
tree | 9b31021dcecbd9b9546f8ea078b77f249352a4c1 /lib | |
parent | d76c9236236747a2a19a10941b1efd497f0202e0 (diff) | |
download | spack-cc0ee3dc29516d6ceb49c4144fa3cb75d0120b0d.tar.gz spack-cc0ee3dc29516d6ceb49c4144fa3cb75d0120b0d.tar.bz2 spack-cc0ee3dc29516d6ceb49c4144fa3cb75d0120b0d.tar.xz spack-cc0ee3dc29516d6ceb49c4144fa3cb75d0120b0d.zip |
The HTML number conversion regex operating against a byte string will only
convert individual bytes, so therefore incorrectly converts utf-8 encoded
characters. Decoding byte strings to unicode objects results in correct HTML
number encodings.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/test-install.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/spack/cmd/test-install.py b/lib/spack/spack/cmd/test-install.py index a9f9331fcb..d916519227 100644 --- a/lib/spack/spack/cmd/test-install.py +++ b/lib/spack/spack/cmd/test-install.py @@ -27,6 +27,7 @@ import xml.etree.ElementTree as ET import itertools import re import os +import codecs import llnl.util.tty as tty from llnl.util.filesystem import * @@ -107,7 +108,7 @@ class BuildId(object): def fetch_log(path): if not os.path.exists(path): return list() - with open(path, 'rb') as F: + with codecs.open(path, 'rb', 'utf-8') as F: return list(line.strip() for line in F.readlines()) |