Mercurial > p > roundup > code
diff roundup/mailgw.py @ 5433:86b6cea7a975
Python 3 preparation: avoid string.split().
| author | Joseph Myers <jsm@polyomino.org.uk> |
|---|---|
| date | Wed, 25 Jul 2018 10:42:42 +0000 |
| parents | 55f09ca366c4 |
| children | 1c9a7310e4f0 |
line wrap: on
line diff
--- a/roundup/mailgw.py Wed Jul 25 10:41:32 2018 +0000 +++ b/roundup/mailgw.py Wed Jul 25 10:42:42 2018 +0000 @@ -95,7 +95,7 @@ from __future__ import print_function __docformat__ = 'restructuredtext' -import string, re, os, mimetools, smtplib, socket, binascii, quopri +import re, os, mimetools, smtplib, socket, binascii, quopri import time, random, sys, logging import codecs import traceback @@ -1555,7 +1555,7 @@ except MailUsageHelp: # bounce the message back to the sender with the usage message self.logger.debug("MailUsageHelp raised, bouncing.") - fulldoc = '\n'.join(string.split(__doc__, '\n')[2:]) + fulldoc = '\n'.join(__doc__.split('\n')[2:]) m = [''] m.append('\n\nMail Gateway Help\n=================') m.append(fulldoc) @@ -1564,7 +1564,7 @@ except MailUsageError as value: # bounce the message back to the sender with the usage message self.logger.debug("MailUsageError raised, bouncing.") - fulldoc = '\n'.join(string.split(__doc__, '\n')[2:]) + fulldoc = '\n'.join(__doc__.split('\n')[2:]) m = [''] m.append(str(value)) m.append('\n\nMail Gateway Help\n=================') @@ -1719,7 +1719,7 @@ ''' props = {} errors = [] - for prop in string.split(propString, ';'): + for prop in propString.split(';'): # extract the property name and value try: propname, value = prop.split('=')
