Mercurial > public > mercurial-scm > hg
comparison mercurial/httprepo.py @ 3072:bc3fe3b5b785
Never apply string formatting to generated errors with util.Abort.
Otherwise error messages containing % chars yield errors or worse.
Fixed (hopefully) all users of util.Abort.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 08 Sep 2006 09:36:18 +0200 |
parents | 345bac2bc4ec |
children | cff3c58a5766 |
comparison
equal
deleted
inserted
replaced
3071:547d1a4aa105 | 3072:bc3fe3b5b785 |
---|---|
323 return ret | 323 return ret |
324 finally: | 324 finally: |
325 rfp.close() | 325 rfp.close() |
326 except socket.error, err: | 326 except socket.error, err: |
327 if err[0] in (errno.ECONNRESET, errno.EPIPE): | 327 if err[0] in (errno.ECONNRESET, errno.EPIPE): |
328 raise util.Abort(_('push failed: %s'), err[1]) | 328 raise util.Abort(_('push failed: %s') % err[1]) |
329 raise util.Abort(err[1]) | 329 raise util.Abort(err[1]) |
330 finally: | 330 finally: |
331 fp.close() | 331 fp.close() |
332 os.unlink(tempname) | 332 os.unlink(tempname) |
333 | 333 |