From 4271058f47f0caac29fa85947a81077e7813c669 Mon Sep 17 00:00:00 2001 From: Fredrik Kuivinen Date: Mon, 15 Aug 2005 21:33:17 +0200 Subject: [PATCH] Fix patch generation. We sometimes got None from QStyleSheet, replace None with the empty string. --- main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index f2ac8f1..5926cb4 100755 --- a/main.py +++ b/main.py @@ -389,7 +389,12 @@ def formatPatchRichText(patch, colors): else: style = 'std' ret.extend(['']) prev = c - ret.extend([str(qt.QStyleSheet.escape(l).ascii()), '\n']) + line = qt.QStyleSheet.escape(l).ascii() + if not line: + line = '' + else: + line = str(line) + ret.extend([line, '\n']) ret.append('') return ''.join(ret) -- 2.11.4.GIT