[Zope-Checkins] CVS: ZODB3/zdaemon - zdctl.py:1.40
Guido van Rossum
guido@python.org
Mon, 27 Jan 2003 09:52:45 -0500
Update of /cvs-repository/ZODB3/zdaemon
In directory cvs.zope.org:/tmp/cvs-serv7977
Modified Files:
zdctl.py
Log Message:
TailHelper: print a message when the file shrinks.
=== ZODB3/zdaemon/zdctl.py 1.39 => 1.40 ===
--- ZODB3/zdaemon/zdctl.py:1.39 Sun Jan 26 01:23:29 2003
+++ ZODB3/zdaemon/zdctl.py Mon Jan 27 09:52:40 2003
@@ -511,6 +511,10 @@
while 1:
newsz = self.fsize()
bytes_added = newsz - sz
+ if bytes_added < 0:
+ sz = 0
+ print "==> File truncated <=="
+ bytes_added = newsz
if bytes_added > 0:
self.f.seek(-bytes_added, 2)
bytes = self.f.read(bytes_added)