pld-builder.new: PLD_Builder/log.py - log.last_log() hack
glen
glen at pld-linux.org
Mon May 25 17:49:29 CEST 2009
Author: glen Date: Mon May 25 15:49:29 2009 GMT
Module: pld-builder.new Tag: HEAD
---- Log message:
- log.last_log() hack
---- Files affected:
pld-builder.new/PLD_Builder:
log.py (1.10 -> 1.11)
---- Diffs:
================================================================
Index: pld-builder.new/PLD_Builder/log.py
diff -u pld-builder.new/PLD_Builder/log.py:1.10 pld-builder.new/PLD_Builder/log.py:1.11
--- pld-builder.new/PLD_Builder/log.py:1.10 Fri Jul 18 13:44:09 2008
+++ pld-builder.new/PLD_Builder/log.py Mon May 25 17:49:24 2009
@@ -9,6 +9,10 @@
builder = ""
do_syslog = 0
+# string containing last log entry,
+# as the code is flawed to get this otherwise
+_last_log = ""
+
def log(p, s):
if do_syslog:
try:
@@ -18,6 +22,7 @@
f = open(path.log_file, "a")
f.write("%s [%s]: %s\n" % (time.asctime(), builder, s))
f.close()
+ _last_log = s
def panic(s):
log(syslog.LOG_ALERT, "PANIC: %s" % s)
@@ -39,3 +44,6 @@
global do_syslog
do_syslog = 1
syslog.openlog(name, syslog.LOG_PID, f)
+
+def last_log():
+ return _last_log
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/log.py?r1=1.10&r2=1.11&f=u
More information about the pld-cvs-commit
mailing list