From 24a8523c0b45b2d937f3cef48b9ccbcc59b8d165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Mon, 5 Jan 2015 12:59:33 +0100 Subject: [PATCH] Gradle cleaner: support multilines with backslashes --- fdroidserver/common.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 775f69ae..41edee71 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1740,8 +1740,15 @@ def remove_signing_keys(build_dir): changed = False opened = 0 + i = 0 with open(path, "w") as o: - for line in lines: + while i < len(lines): + line = lines[i] + i += 1 + while line.endswith('\\\n'): + line = line.rstrip('\\\n') + lines[i] + i += 1 + if comment.match(line): continue