fixed some comments and opened the logfiles in ascii rather than binary mode

This commit is contained in:
unknown 2014-03-04 22:59:34 -06:00
parent 875d6cf282
commit b4728f3f93

View File

@ -83,15 +83,13 @@ def Main():
parser.add_argument( '--stderr', type = str, default = None, parser.add_argument( '--stderr', type = str, default = None,
help = 'optional file to use for stderr' ) help = 'optional file to use for stderr' )
parser.add_argument( '--keep_logfiles', action = 'store_true', default = None, 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() args = parser.parse_args()
if args.stdout is not None: if args.stdout is not None:
sys.stdout = open(args.stdout, "wb") sys.stdout = open(args.stdout, "w")
#os.dup2(stdout.fileno(), sys.stdout.fileno())
if args.stderr is not None: if args.stderr is not None:
sys.stderr = open(args.stderr, "wb") sys.stderr = open(args.stderr, "w")
#os.dup2(stderr.fileno(), sys.stderr.fileno())
numeric_level = getattr( logging, args.log.upper(), None ) numeric_level = getattr( logging, args.log.upper(), None )
if not isinstance( numeric_level, int ): if not isinstance( numeric_level, int ):