From ff1579f6feca94f0382dac036d172da2878f76b9 Mon Sep 17 00:00:00 2001 From: desaster Date: Sun, 22 Nov 2009 19:22:36 +0000 Subject: [PATCH] win32 fixes git-svn-id: https://kippo.googlecode.com/svn/trunk@54 951d7100-d841-11de-b865-b3884708a8e2 --- kippo/core/ttylog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kippo/core/ttylog.py b/kippo/core/ttylog.py index 61c398f..db83973 100644 --- a/kippo/core/ttylog.py +++ b/kippo/core/ttylog.py @@ -9,20 +9,20 @@ OP_OPEN, OP_CLOSE, OP_WRITE, OP_EXEC = 1, 2, 3, 4 DIR_READ, DIR_WRITE = 1, 2 def ttylog_write(logfile, len, direction, stamp, data = None): - f = file(logfile, 'a') + f = file(logfile, 'ab') sec, usec = int(stamp), int(1000000 * (stamp - int(stamp))) f.write(struct.pack('iLiiLL', 3, 0, len, direction, sec, usec)) f.write(data) f.close() def ttylog_open(logfile, stamp): - f = file(logfile, 'a') + f = file(logfile, 'ab') sec, usec = int(stamp), int(1000000 * (stamp - int(stamp))) f.write(struct.pack('iLiiLL', 1, 0, 0, 0, sec, usec)) f.close() def ttylog_close(logfile, stamp): - f = file(logfile, 'a') + f = file(logfile, 'ab') sec, usec = int(stamp), int(1000000 * (stamp - int(stamp))) f.write(struct.pack('iLiiLL', 2, 0, 0, 0, sec, usec)) f.close()