Skip to content

Commit

Permalink
LogWatcher: Create log files before trying to tail them; this makes t…
Browse files Browse the repository at this point in the history
…he watch code work when twistd.log isn't preexisting.
  • Loading branch information
ddunbar committed Dec 27, 2009
1 parent af5c745 commit 9c37ea8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions buildbot/scripts/logwatcher.py
Expand Up @@ -38,6 +38,10 @@ def __init__(self, logfile):
self.timer = None

def start(self):
# If the log file doesn't exist, create it now.
if not os.path.exists(self.logfile):
open(self.logfile, 'a').close()

# return a Deferred that fires when the reconfig process has
# finished. It errbacks with TimeoutError if the finish line has not
# been seen within 10 seconds, and with ReconfigError if the error
Expand Down

0 comments on commit 9c37ea8

Please sign in to comment.