Skip to content

Commit

Permalink
Fix pycodestyle errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigc committed Mar 21, 2018
1 parent 7893712 commit 72c0beb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/twisted/mail/scripts/mailmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@




class Options:
"""
Store the values of the parsed command-line options to the I{mailmail}
Expand Down Expand Up @@ -298,7 +297,7 @@ def loadConfig(path):
parts = up.split(':', 1)
if len(parts) != 2:
_log.error("Illegal entry in [identity] section: {section}",
section=up)
section=up)
continue
c.identities[host] = parts

Expand Down
12 changes: 6 additions & 6 deletions src/twisted/mail/test/test_mailmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from twisted.trial.unittest import TestCase



class OptionsTests(TestCase):
"""
Tests for L{parseOptions} which parses command line arguments and reads
Expand Down Expand Up @@ -50,7 +51,7 @@ def sendmail(host, options, ident):
self.options = options
self.ident = ident
return smtp.sendmail(host, options.sender, options.to,
options.body, reactor=self.memoryReactor)
options.body, reactor=self.memoryReactor)

self.patch(mailmail, 'sendmail', sendmail)

Expand Down Expand Up @@ -207,7 +208,7 @@ def test_run(self):

if platformType == "win32":
test_run.skip = ("mailmail.run() does not work on win32 due to "
"lack of support for getuid()")
"lack of support for getuid()")


def test_readInvalidConfig(self):
Expand Down Expand Up @@ -259,8 +260,8 @@ def test_readInvalidConfig(self):
'Illegal entry in \[identity\] section: funny')

if platformType == "win32":
test_readInvalidConfig.skip = ("mailmail.run() does not work on win32 due to "
"lack of support for getuid()")
test_readInvalidConfig.skip = ("mailmail.run() does not work on win32"
" due to lack of support for getuid()")


def _loadConfig(self, config):
Expand Down Expand Up @@ -315,8 +316,7 @@ def test_loadConfig(self):
host1=invalid
host2=username:password""")
self.assertNotIn("host1", config.identities)
self.assertEqual(config.identities["host2"],
["username", "password"])
self.assertEqual(config.identities["host2"], ["username", "password"])

config = self._loadConfig("""
[useraccess]
Expand Down

0 comments on commit 72c0beb

Please sign in to comment.