summaryrefslogtreecommitdiff
path: root/tb3
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2013-07-14 20:17:33 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2013-07-14 20:17:33 +0200
commitd628621c6ac515e07d6ad1882f0239782fcd6473 (patch)
treec0383af403d5e16fa9783b8b9f0b6eae485de809 /tb3
parent7fed43a1b7b7ef26eee628e1681e8acc619b58e8 (diff)
check for keys first
Diffstat (limited to 'tb3')
-rwxr-xr-xtb3/tb38
1 files changed, 4 insertions, 4 deletions
diff --git a/tb3/tb3 b/tb3/tb3
index 8a7c4ba..b05521b 100755
--- a/tb3/tb3
+++ b/tb3/tb3
@@ -65,17 +65,17 @@ def show_proposals(parms):
print(json.dumps([p.__dict__ for p in proposals]))
def execute(parms):
- if type(parms['estimated_duration']) is float:
+ if parms.has_key('estimated_duration') and type(parms['estimated_duration']) is float:
parms['estimated_duration'] = datetime.timedelta(minutes=parms['estimated_duration'])
if parms['sync']:
sync(parms)
- if parms['set_commit_finished']:
+ if parms.has_key('set_commit_finished') and parms['set_commit_finished']:
set_commit_finished(parms)
- if parms['set_commit_running']:
+ if parms.has_key('set_commit_running') and parms['set_commit_running']:
set_commit_running(parms)
if parms['show_state']:
show_state(parms)
- if parms['show_history']:
+ if parms.has_key('show_history') and parms['show_history']:
show_history(parms)
if parms['show_proposals']:
show_proposals(parms)