X-Git-Url: https://git.ucc.asn.au/?p=progcomp2013.git;a=blobdiff_plain;f=qchess%2Fsrc%2Fmain.py;h=61e030b3647531128ce2b0e7462b71ee5d6ae8fe;hp=87fe35b990590af81b1c1e9aa730462efdb08abc;hb=337c794fe317a54c65bf5de103bf1a55c0ceb141;hpb=0325af7e6f9c20b549efa84754b4a4a206fe66cc diff --git a/qchess/src/main.py b/qchess/src/main.py index 87fe35b..61e030b 100644 --- a/qchess/src/main.py +++ b/qchess/src/main.py @@ -127,13 +127,13 @@ def main(argv): elif (arg[1] == '-' and arg[2:].split("=")[0] == "log"): # Log file if len(arg[2:].split("=")) == 1: - log_file = sys.stdout + log_file = LogFile(sys.stdout) else: f = arg[2:].split("=")[1] if f[0] == '@': log_file = HttpLog(f[1:]) else: - log_file = LogFile(f) + log_file = LogFile(open(f, "w", 0)) elif (arg[1] == '-' and arg[2:].split("=")[0] == "delay"): # Delay if len(arg[2:].split("=")) == 1: @@ -263,7 +263,6 @@ def main(argv): if log_file != None and log_file != sys.stdout: - log_file.write("# EOF\n") log_file.close() if src_file != None and src_file != sys.stdin: