Mercurial > hg
comparison mercurial/transaction.py @ 9094:89ae64a4e2ec
transaction: fix uncaught ENOENT (issue1724)
The opener raises an IOError on errors where transaction expects an
OSError.
author | Henrik Stuart <henrik.stuart@edlund.dk> |
---|---|
date | Tue, 07 Jul 2009 19:24:52 +0200 |
parents | c8e81f557da7 |
children | 8a4da1388553 |
comparison
equal
deleted
inserted
replaced
9093:0b2b269ba3d0 | 9094:89ae64a4e2ec |
---|---|
33 raise | 33 raise |
34 else: | 34 else: |
35 try: | 35 try: |
36 fn = opener(f).name | 36 fn = opener(f).name |
37 os.unlink(fn) | 37 os.unlink(fn) |
38 except OSError, inst: | 38 except IOError, inst: |
39 if inst.errno != errno.ENOENT: | 39 if inst.errno != errno.ENOENT: |
40 raise | 40 raise |
41 os.unlink(journal) | 41 os.unlink(journal) |
42 | 42 |
43 class transaction(object): | 43 class transaction(object): |