From eea422233e7184cb9e66be3538ffa8fc96a3cfd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= Date: Wed, 14 Nov 2012 18:39:15 +0100 Subject: [PATCH] fix metadata tag removal bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- ponysay-tool.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ponysay-tool.py b/ponysay-tool.py index 4607609d..08c3663b 100755 --- a/ponysay-tool.py +++ b/ponysay-tool.py @@ -763,6 +763,8 @@ class PonysayTool(): keys = [key for key in data] keys.sort() for key in keys: + if self.data[key] is None: + continue if (key == 'comment') or (len(self.data[key].strip()) == 0): continue values = self.data[key].strip() @@ -949,6 +951,8 @@ class TextArea: # TODO support small screens current = leftlines[row] if len(datalines[row].strip()) == 0: if current is not 'comment': + if current != last: + self.datamap[current] = None continue if current == last: self.datamap[current] += '\n' + datalines[row]