comparison mercurial/commands.py @ 395:fbe8834923c5

commands: report http exceptions nicely -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 commands: report http exceptions nicely manifest hash: 37760b304eedffcea9c1c01d03334cf4f6048fd3 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCsx6QywK+sNU5EO8RAnyEAKC3RBzwlVAyI+SSYHj1Z+Psn1Aq3gCcDQJf pqPitXBuvdZbLdK0ti2kFOk= =ZjC9 -----END PGP SIGNATURE-----
author mpm@selenic.com
date Fri, 17 Jun 2005 11:03:44 -0800
parents e3f564643888
children 8f8bb77d560e
comparison
equal deleted inserted replaced
394:e6db25785b00 395:fbe8834923c5
750 except SignalInterrupt: 750 except SignalInterrupt:
751 u.warn("killed!\n") 751 u.warn("killed!\n")
752 except KeyboardInterrupt: 752 except KeyboardInterrupt:
753 u.warn("interrupted!\n") 753 u.warn("interrupted!\n")
754 except IOError, inst: 754 except IOError, inst:
755 if inst.errno == errno.EPIPE: 755 if hasattr(inst, "code"):
756 u.warn("abort: %s\n" % inst)
757 elif hasattr(inst, "reason"):
758 u.warn("abort: error %d: %s\n" % (inst.reason[0], inst.reason[1]))
759 elif hasattr(inst, "args") and inst[0] == errno.EPIPE:
756 u.warn("broken pipe\n") 760 u.warn("broken pipe\n")
757 else: 761 else:
758 raise 762 raise
759 except TypeError, inst: 763 except TypeError, inst:
760 # was this an argument error? 764 # was this an argument error?