projects
/
tools
/
python-jenkinsapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61c92e8
)
handle missing build objects slightly better
author
Salim Fadhley
<sal@stodge.org>
Sun, 30 Jun 2013 01:12:53 +0000
(
02:12
+0100)
committer
Salim Fadhley
<sal@stodge.org>
Sun, 30 Jun 2013 01:12:53 +0000
(
02:12
+0100)
jenkinsapi/invocation.py
patch
|
blob
|
history
diff --git
a/jenkinsapi/invocation.py
b/jenkinsapi/invocation.py
index 36c1a4c1ea92f77e1a41c1f5e9f9abeb5b1e3e16..f014ff2151b0eb50dad9572dcbaba98e7dd5dbe0 100644
(file)
--- a/
jenkinsapi/invocation.py
+++ b/
jenkinsapi/invocation.py
@@
-96,8
+96,14
@@
class Invocation(object):
def is_running(self):
"""
Returns True if this item is executing now
- """
- return self.get_build().is_running()
+ Returns False if this item has completed
+ or has not yet executed.
+ """
+ try:
+ return self.get_build().is_running()
+ except KeyError:
+ # This item has not yet executed
+ return False
def is_queued_or_running(self):
return self.is_queued() or self.is_running()