comparison mercurial/commands.py @ 773:d77c1031fd17

Hide errno in abort messages
author mpm@selenic.com
date Tue, 26 Jul 2005 21:52:40 -0500
parents 0de223012086
children d09975474928
comparison
equal deleted inserted replaced
772:f05deda58457 773:d77c1031fd17
1344 u.warn("interrupted!\n") 1344 u.warn("interrupted!\n")
1345 except IOError, inst: 1345 except IOError, inst:
1346 if hasattr(inst, "code"): 1346 if hasattr(inst, "code"):
1347 u.warn("abort: %s\n" % inst) 1347 u.warn("abort: %s\n" % inst)
1348 elif hasattr(inst, "reason"): 1348 elif hasattr(inst, "reason"):
1349 u.warn("abort: error %d: %s\n" % (inst.reason[0], inst.reason[1])) 1349 u.warn("abort: error: %s\n" % inst.reason[1])
1350 elif hasattr(inst, "args") and inst[0] == errno.EPIPE: 1350 elif hasattr(inst, "args") and inst[0] == errno.EPIPE:
1351 if u.debugflag: u.warn("broken pipe\n") 1351 if u.debugflag: u.warn("broken pipe\n")
1352 else: 1352 else:
1353 raise 1353 raise
1354 except OSError, inst: 1354 except OSError, inst: