From ecf2bee8a6f7f172b092d89c31da486633a0b926 Mon Sep 17 00:00:00 2001 From: "Martin A. Brown" Date: Fri, 12 Feb 2016 12:42:58 -0800 Subject: [PATCH] removing unused sys; shortening logger lines --- tldp/sources.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tldp/sources.py b/tldp/sources.py index a951caa..c7b48e4 100644 --- a/tldp/sources.py +++ b/tldp/sources.py @@ -3,7 +3,6 @@ from __future__ import absolute_import, division, print_function import os -import sys import operator from .utils import logger @@ -26,9 +25,9 @@ class Sources(object): def validateDirs(self): results = [os.path.exists(x) for x in self.sourcedirs] if not all(results): - for result, sourcedir in zip(results, self.sourcedir): - logger.critical("[Errno 2] No such file or directory: " + sourcedir) - raise OSError("[Errno 2] No such file or directory: " + sourcedir) + for result, sdir in zip(results, self.sourcedir): + logger.critical("[Errno 2] No such file or directory: " + sdir) + raise OSError("[Errno 2] No such file or directory: " + sdir) def enumerateDocuments(self): for sdir in self.sourcedirs: