~barry/mailman/lp1423756

« back to all changes in this revision

Viewing changes to src/mailman/archiving/mhonarc.py

  • Committer: Barry Warsaw
  • Date: 2015-01-05 01:20:33 UTC
  • mfrom: (7264.4.66 py3)
  • Revision ID: barry@list.org-20150105012033-zdrw9c2odhpf22fz
Merge the Python 3 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""MHonArc archiver."""
19
19
 
20
 
from __future__ import absolute_import, print_function, unicode_literals
21
 
 
22
 
__metaclass__ = type
23
20
__all__ = [
24
21
    'MHonArc',
25
22
    ]
28
25
import logging
29
26
import subprocess
30
27
 
31
 
from urlparse import urljoin
32
 
from zope.interface import implementer
33
 
 
34
28
from mailman.config import config
35
29
from mailman.config.config import external_configuration
36
30
from mailman.interfaces.archiver import IArchiver
37
31
from mailman.utilities.string import expand
 
32
from six.moves.urllib_parse import urljoin
 
33
from zope.interface import implementer
38
34
 
39
35
 
40
36
log = logging.getLogger('mailman.archiver')
84
80
        command = expand(self.command, substitutions)
85
81
        proc = subprocess.Popen(
86
82
            command, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
87
 
            shell=True)
 
83
            universal_newlines=True, shell=True)
88
84
        stdout, stderr = proc.communicate(msg.as_string())
89
85
        if proc.returncode != 0:
90
86
            log.error('%s: mhonarc subprocess had non-zero exit code: %s' %