Package: zim / 0.62-3

0003-Fix-small-bug-in-parsing-preferences-for-tasklist.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: =?utf-8?q?Rapha=C3=ABl_Hertzog?= <hertzog@debian.org>
Date: Wed, 22 Oct 2014 10:08:58 +0200
Subject: Fix small bug in parsing preferences for tasklist

Bug-Debian: http://bugs.debian.org/765746
Origin: upstream, http://bazaar.launchpad.net/~jaap.karssenberg/zim/pyzim/revision/744
Forwarded: not-needed
---
 zim/plugins/tasklist.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/zim/plugins/tasklist.py b/zim/plugins/tasklist.py
index 9506a64..a1dcdcf 100644
--- a/zim/plugins/tasklist.py
+++ b/zim/plugins/tasklist.py
@@ -180,9 +180,12 @@ class IndexExtension(ObjectExtension):
 	def _set_preferences(self):
 		self._current_preferences = self._serialize_rebuild_on_preferences()
 
-		string = self.preferences['labels'].strip(' ,')
-		if string:
-			self.task_labels = [s.strip() for s in self.preferences['labels'].split(',')]
+		if self.preferences['labels']:
+			self.task_labels = [
+				s.strip()
+					for s in self.preferences['labels'].split(',')
+						if s and not s.isspace()
+			]
 		else:
 			self.task_labels = []