server/crawler_perhost | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 7c4e194f5ada28f430b2267717f0846a1382965b
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Mon Jul 19 11:27:01 2010 -0500
crawler: don't close sys.stdout as logfile, leave that for sys.exit()
diff --git a/server/crawler_perhost b/server/crawler_perhost
index eda28aa..52f2456 100755
--- a/server/crawler_perhost
+++ b/server/crawler_perhost
@@ -519,7 +519,7 @@ def sigusr1_handler(signum, frame):
reopenLogs = False
def reopen_logs():
global logfile
- if logfile is not None:
+ if logfile is not None and logfile != sys.stdout:
fname = logfile.name
logfile.flush()
# it's a logfile, don't care if it's fsynced to disk or not...
@@ -684,7 +684,7 @@ def main():
print >>logfile, "Ending crawl %s" % (datetime.utcnow().isoformat())
logfile.flush()
- logfile.close()
+ if logfile != sys.stdout: logfile.close()
if __name__ == "__main__":
Show replies by date