##// END OF EJS Templates
debugcommands: work around logiofd being a pipe and unseekable...
Augie Fackler -
r38333:275cc461 default
parent child Browse files
Show More
@@ -2289,7 +2289,13 b' def debugserve(ui, repo, **opts):'
2289 2289
2290 2290 if opts['logiofd']:
2291 2291 # Line buffered because output is line based.
2292 logfh = os.fdopen(int(opts['logiofd']), r'ab', 1)
2292 try:
2293 logfh = os.fdopen(int(opts['logiofd']), r'ab', 1)
2294 except OSError as e:
2295 if e.errno != errno.ESPIPE:
2296 raise
2297 # can't seek a pipe, so `ab` mode fails on py3
2298 logfh = os.fdopen(int(opts['logiofd']), r'wb', 1)
2293 2299 elif opts['logiofile']:
2294 2300 logfh = open(opts['logiofile'], 'ab', 1)
2295 2301
General Comments 0
You need to be logged in to leave comments. Login now