From b4728f3f930ebbdcb5cd216e6e72c82850a51ec2 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 4 Mar 2014 22:59:34 -0600 Subject: [PATCH] fixed some comments and opened the logfiles in ascii rather than binary mode --- python/ycm/server/ycmd.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/python/ycm/server/ycmd.py b/python/ycm/server/ycmd.py index dcb1bfd4..34870644 100755 --- a/python/ycm/server/ycmd.py +++ b/python/ycm/server/ycmd.py @@ -83,15 +83,13 @@ def Main(): parser.add_argument( '--stderr', type = str, default = None, help = 'optional file to use for stderr' ) parser.add_argument( '--keep_logfiles', action = 'store_true', default = None, - help = 'optional file to use for stderr' ) + help = 'retain logfiles after the server exits' ) args = parser.parse_args() if args.stdout is not None: - sys.stdout = open(args.stdout, "wb") - #os.dup2(stdout.fileno(), sys.stdout.fileno()) + sys.stdout = open(args.stdout, "w") if args.stderr is not None: - sys.stderr = open(args.stderr, "wb") - #os.dup2(stderr.fileno(), sys.stderr.fileno()) + sys.stderr = open(args.stderr, "w") numeric_level = getattr( logging, args.log.upper(), None ) if not isinstance( numeric_level, int ):