From 574de16fdd26f805496783ce8419ecca0d5297d6 Mon Sep 17 00:00:00 2001 From: Joseph Coffland Date: Mon, 12 Oct 2020 14:45:27 -0700 Subject: [PATCH] Fix PyON escape sequences --- CHANGELOG.md | 6 ++++++ fah/util/PYONDecoder.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ece731..6f3673e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Folding@home Advanced Control Changelog ======================================= +## v7.6.20 + - Fix PyON escape sequences. + +## v7.6.19 + - Use modified JSON parser to parse PyON. + ## v7.6.15 - Removed ``gpu-index``, ``opencl-index`` and ``cuda-index`` config. diff --git a/fah/util/PYONDecoder.py b/fah/util/PYONDecoder.py index 789f82b..9a77406 100644 --- a/fah/util/PYONDecoder.py +++ b/fah/util/PYONDecoder.py @@ -125,9 +125,9 @@ def pyon_scanstring(s, end, encoding = None, strict = True, elif esc == 'x': # Hex escape sequence + code = s[end + 1: end + 3] try: - code = s[end + 1: end + 3] - char = code.decode('hex') + char = unichr(int(code, 16)) except: raise ValueError(errmsg('Invalid \\escape: ' + repr(code), s, end))