Mercurial > hg > Feedworm
comparison util.py @ 46:03358c113170
Better preferences handling: the GUI's responsibility is to convert the input from the event into a boolean value
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Sun, 16 May 2010 07:54:24 +0200 |
parents | 12ed8b5fa08c |
children | 254d5b89a6ca |
comparison
equal
deleted
inserted
replaced
45:0604e374c1d6 | 46:03358c113170 |
---|---|
26 feed.next_update = datetime.now() - timedelta(minutes=1) | 26 feed.next_update = datetime.now() - timedelta(minutes=1) |
27 session.commit() | 27 session.commit() |
28 | 28 |
29 def str2bool(string): | 29 def str2bool(string): |
30 return string.lower() in ["yes", "true", "t", "1"] | 30 return string.lower() in ["yes", "true", "t", "1"] |
31 | |
32 def bool2str(bool): | |
33 if bool: | |
34 return "True" | |
35 else: | |
36 return "False" |