Mercurial > public > mercurial-scm > hg
comparison mercurial/patch.py @ 7507:8e76e9f67cb3
patch: catch only IOError from makedirs()
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Thu, 11 Dec 2008 22:59:35 +0100 |
parents | fe0e02f952b0 |
children | 49f34b43cf90 e4ab4802f261 |
comparison
equal
deleted
inserted
replaced
7506:abd2bc899d86 | 7507:8e76e9f67cb3 |
---|---|
30 | 30 |
31 dstdir = os.path.dirname(absdst) | 31 dstdir = os.path.dirname(absdst) |
32 if dstdir and not os.path.isdir(dstdir): | 32 if dstdir and not os.path.isdir(dstdir): |
33 try: | 33 try: |
34 os.makedirs(dstdir) | 34 os.makedirs(dstdir) |
35 except: | 35 except IOError: |
36 raise util.Abort( | 36 raise util.Abort( |
37 _("cannot create %s: unable to create destination directory") | 37 _("cannot create %s: unable to create destination directory") |
38 % dst) | 38 % dst) |
39 | 39 |
40 util.copyfile(abssrc, absdst) | 40 util.copyfile(abssrc, absdst) |