~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/msgeditor.py

  • Committer: Martin Pool
  • Date: 2009-11-26 01:42:06 UTC
  • mfrom: (4827 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4828.
  • Revision ID: mbp@sourcefrog.net-20091126014206-qvf8jfpwpro558r4
merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
            x = call(edargs + [filename])
65
65
        except OSError, e:
66
66
            # We're searching for an editor, so catch safe errors and continue
67
 
            if e.errno in (errno.ENOENT, errno.EACCES):
 
67
            # errno 193 is ERROR_BAD_EXE_FORMAT on Windows. Python2.4 uses the
 
68
            # winerror for errno. Python2.5+ use errno ENOEXEC and set winerror
 
69
            # to 193. However, catching 193 here should be fine. Other
 
70
            # platforms aren't likely to have that high of an error. And even
 
71
            # if they do, it is still reasonable to fall back to the next
 
72
            # editor.
 
73
            if e.errno in (errno.ENOENT, errno.EACCES, errno.ENOEXEC, 193):
68
74
                if candidate_source is not None:
69
75
                    # We tried this editor because some user configuration (an
70
76
                    # environment variable or config file) said to try it.  Let