f.seek(0)
f.truncate()
f.write(lighttpd_conf)
+ f.close()
# Reload lighttpd configuration
print "Reloading lighttpd: %s" % reload_lighttpd
if ret != 0:
print >> sys.stderr, "Reloading lighttpd failed. Logging.conf was:"
print >> sys.stderr, lighttpd_conf
-
-f.close()
+else:
+ f.close()
# Now, run awstats to parse log files.