[hamster-applet] avoid spaces everywhere



commit 3fdf32888b33f9ea14059b66da18c1318d578a38
Author: Toms Bauģis <toms baugis gmail com>
Date:   Wed Feb 10 09:00:20 2010 +0000

    avoid spaces everywhere

 src/hamster/stuff.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/hamster/stuff.py b/src/hamster/stuff.py
index 3d2f704..21ea0c8 100644
--- a/src/hamster/stuff.py
+++ b/src/hamster/stuff.py
@@ -237,7 +237,7 @@ def parse_activity_input(text):
 
     res = InputParseResult()
 
-    input_parts = text.split(" ")
+    input_parts = text.strip().split(" ")
     if len(input_parts) > 1 and re.match('^-?\d', input_parts[0]): #look for time only if there is more
         potential_time = text.split(" ")[0]
         potential_end_time = None
@@ -285,7 +285,7 @@ def parse_activity_input(text):
         res.category_name = res.category_name.strip()
 
     #only thing left now is the activity name itself
-    res.activity_name = text
+    res.activity_name = text.strip()
 
     #this is most essential
     if (text.find("bbq") > -1 or text.find("barbeque") > -1



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