Fixed lint issues

This commit is contained in:
Brad Warren
2015-12-11 18:03:52 -08:00
parent 2b942d97b2
commit 74927613e9
2 changed files with 4 additions and 5 deletions
+2 -3
View File
@@ -2,7 +2,6 @@
import errno
import logging
import os
import stat
import zope.interface
@@ -105,10 +104,10 @@ to serve all files under specified web root ({0})."""
path = self.full_roots[achall.domain]
except IndexError:
raise errors.PluginError("Missing --webroot-path for domain: {1}"
.format(achall.domain))
.format(achall.domain))
if not os.path.exists(path):
raise errors.PluginError("Mysteriously missing path {0} for domain: {1}"
.format(path, achall.domain))
.format(path, achall.domain))
return os.path.join(path, achall.chall.encode("token"))
def _perform_single(self, achall):
+2 -2
View File
@@ -48,7 +48,7 @@ class AuthenticatorTest(unittest.TestCase):
def test_add_parser_arguments(self):
add = mock.MagicMock()
self.auth.add_parser_arguments(add)
self.assertEqual(0, add.call_count) # became 0 when we moved the args to cli.py!
self.assertEqual(0, add.call_count) # args moved to cli.py!
def test_prepare_bad_root(self):
self.config.webroot_path = os.path.join(self.path, "null")
@@ -80,7 +80,7 @@ class AuthenticatorTest(unittest.TestCase):
# Check permissions of the directories
for dirpath, dirnames, filenames in os.walk(self.path):
for dirpath, dirnames, _ in os.walk(self.path):
for directory in dirnames:
full_path = os.path.join(dirpath, directory)
dir_permissions = stat.S_IMODE(os.stat(full_path).st_mode)