Mercurial > hg
comparison hgext/mq.py @ 7421:4c4324476be6
Catch both IOError and OSError, fix regression introduced by 8046f0a070a6
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Wed, 26 Nov 2008 18:23:35 +0100 |
parents | 040484030491 |
children | 9898427add1c |
comparison
equal
deleted
inserted
replaced
7420:b4ac1e2cd38c | 7421:4c4324476be6 |
---|---|
1581 if not patchname: | 1581 if not patchname: |
1582 raise util.Abort(_('need --name to import a patch from -')) | 1582 raise util.Abort(_('need --name to import a patch from -')) |
1583 text = sys.stdin.read() | 1583 text = sys.stdin.read() |
1584 else: | 1584 else: |
1585 text = url.open(self.ui, filename).read() | 1585 text = url.open(self.ui, filename).read() |
1586 except IOError: | 1586 except (OSError, IOError): |
1587 raise util.Abort(_("unable to read %s") % filename) | 1587 raise util.Abort(_("unable to read %s") % filename) |
1588 if not patchname: | 1588 if not patchname: |
1589 patchname = normname(os.path.basename(filename)) | 1589 patchname = normname(os.path.basename(filename)) |
1590 self.check_reserved_name(patchname) | 1590 self.check_reserved_name(patchname) |
1591 checkfile(patchname) | 1591 checkfile(patchname) |