[hamster-applet] when looking for time, make sure it is in the beginning of text. fixes bug 589759
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Subject: [hamster-applet] when looking for time, make sure it is in the beginning of text. fixes bug 589759
- Date: Sun, 26 Jul 2009 15:39:39 +0000 (UTC)
commit a977310acd0e643ad6e2168004cbaf9586e617e0
Author: Toms Bauģis <toms baugis gmail com>
Date: Sun Jul 26 18:39:00 2009 +0300
when looking for time, make sure it is in the beginning of text. fixes bug 589759
hamster/stuff.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/hamster/stuff.py b/hamster/stuff.py
index e417ca0..96e9002 100644
--- a/hamster/stuff.py
+++ b/hamster/stuff.py
@@ -257,7 +257,7 @@ def parse_activity_input(text):
res = InputParseResult()
input_parts = text.split(" ")
- if len(input_parts) > 1: #look for time only if there is more
+ 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
if len(potential_time) > 1 and potential_time.startswith("-"):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]