[hamster-applet] nyah, should really clean up the activity entry parsing; in case of no description the first tag was



commit 1614255a38d7a99392362db1c588c09f1679ffac
Author: Toms Bauģis <toms baugis gmail com>
Date:   Mon May 23 14:39:24 2011 +0300

    nyah, should really clean up the activity entry parsing; in case of no description the first tag was not found

 src/hamster/lib/stuff.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/hamster/lib/stuff.py b/src/hamster/lib/stuff.py
index 842158b..278a1ea 100644
--- a/src/hamster/lib/stuff.py
+++ b/src/hamster/lib/stuff.py
@@ -292,12 +292,13 @@ class Fact(object):
         #see if we have description of activity somewhere here (delimited by comma)
         if activity.find(",") > 0:
             activity, self.description = activity.split(",", 1)
-            self.description = self.description.strip()
 
             if " #" in self.description:
                 self.description, self.tags = self.description.split(" #", 1)
                 self.tags = [tag.strip(", ") for tag in self.tags.split("#") if tag.strip(", ")]
 
+            self.description = self.description.strip()
+
         if activity.find("@") > 0:
             activity, self.category = activity.split("@", 1)
             self.category = self.category.strip()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]