/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/mail_client.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import sys
23
23
import tempfile
24
24
 
25
 
import bzrlib
26
 
from bzrlib import (
 
25
import breezy
 
26
from . import (
27
27
    config as _mod_config,
28
28
    email_message,
29
29
    errors,
184
184
                                                         **kwargs))
185
185
            try:
186
186
                subprocess.call(cmdline)
187
 
            except OSError, e:
 
187
            except OSError as e:
188
188
                if e.errno != errno.ENOENT:
189
189
                    raise
190
190
            else:
529
529
 
530
530
        This implementation uses MAPI via the simplemapi ctypes wrapper
531
531
        """
532
 
        from bzrlib.util import simplemapi
 
532
        from .util import simplemapi
533
533
        try:
534
534
            simplemapi.SendMail(to or '', subject or '', body or '',
535
535
                                attach_path)
536
 
        except simplemapi.MAPIError, e:
 
536
        except simplemapi.MAPIError as e:
537
537
            if e.code != simplemapi.MAPI_USER_ABORT:
538
538
                raise errors.MailClientNotFound(['MAPI supported mail client'
539
539
                                                 ' (error %d)' % (e.code,)])