overseer/command.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit 38839318610e70fa499645e9d12f6179d21699cf
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Thu May 27 11:30:01 2010 -0400
conditional on status_query
diff --git a/overseer/command.py b/overseer/command.py
index fe50562..fa60728 100755
--- a/overseer/command.py
+++ b/overseer/command.py
@@ -102,10 +102,11 @@ class Root:
session = Session()
status_query = session.query(Job).filter_by(jobId=data['id']).first()
logfile_m = "Log started."
- logfile_path = str(status_query.path)
- if os.path.isfile(logfile_path):
- logfile = open(logfile_path)
- logfile_m = logfile.readlines()[-1].strip('\n')
+ if status_query:
+ logfile_path = str(status_query.path)
+ if os.path.isfile(logfile_path):
+ logfile = open(logfile_path)
+ logfile_m = logfile.readlines()[-1].strip('\n')
mytemplate = mylookup.get_template("status.html")
session.close()
Show replies by date