diff options
author | Gildas Quéméner <gquemener@users.noreply.github.com> | 2018-11-28 12:38:31 +0400 |
---|---|---|
committer | Gildas Quéméner <gildas.quemener@gmail.com> | 2018-11-29 10:16:16 +0400 |
commit | 675b77dc32f419c2d1d2b6adefc153c731805c18 (patch) | |
tree | b0403d54d24be8c7d55e1e4abfc25e450b755f8c /python3 | |
parent | 564d8aa2490d37d7fee144094626006cf038b47f (diff) | |
download | vdebug-675b77dc32f419c2d1d2b6adefc153c731805c18.zip |
Handled UnicodeDecodeError on invalid string value
Diffstat (limited to 'python3')
-rw-r--r-- | python3/vdebug/dbgp.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/python3/vdebug/dbgp.py b/python3/vdebug/dbgp.py index 4641b49..bfa2ec8 100644 --- a/python3/vdebug/dbgp.py +++ b/python3/vdebug/dbgp.py @@ -420,8 +420,11 @@ class ContextProperty: if node.text is None: self.value = "" else: - self.value = base64.decodebytes( - node.text.encode("UTF-8")).decode("utf-8") + try: + self.value = base64.decodebytes( + node.text.encode("UTF-8")).decode("utf-8") + except UnicodeDecodeError: + self.value = node.text elif not self.is_uninitialized() and not self.has_children: self.value = node.text |