From 99614a470f23d3d613576fcef8c1578758333063 Mon Sep 17 00:00:00 2001 From: Mathieu Comandon Date: Mon, 13 Mar 2017 21:08:12 -0700 Subject: [PATCH] Fix registry parsing with keys ending with double backslashes (Fixes #541) --- lutris/util/wineregistry.py | 6 +++++- tests/test_registry.py | 12 ++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lutris/util/wineregistry.py b/lutris/util/wineregistry.py index 27be6997a..00f5ceade 100644 --- a/lutris/util/wineregistry.py +++ b/lutris/util/wineregistry.py @@ -215,7 +215,11 @@ class WineRegistryKey(object): if line.startswith('#'): self.add_meta(line) elif line.startswith('"'): - key, value = re.split(re.compile(r'(?<=[^\\]\")='), line, maxsplit=1) + try: + key, value = re.split(re.compile(r"(?