From 2c17f9e9117ce3a95c3f9959d83ad16566c3efe1 Mon Sep 17 00:00:00 2001 From: Kelsey Prantis Date: Fri, 4 May 2012 15:17:12 -0600 Subject: [PATCH] Continue if exclude-dir doesn't exist, just log warning. --- nose_exclude.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nose_exclude.py b/nose_exclude.py index aa9600d..65cee0d 100644 --- a/nose_exclude.py +++ b/nose_exclude.py @@ -34,7 +34,7 @@ class NoseExclude(Plugin): if os.path.exists(abspath): return abspath else: - raise ValueError("invalid path: %s" % pathname) + log.warn('The following path was not found: %s' % pathname) def _load_from_file(self, filename): infile = open(filename) @@ -72,7 +72,8 @@ class NoseExclude(Plugin): for d in exclude_param.split('\n'): d = d.strip() abs_d = self._force_to_abspath(d) - self.exclude_dirs[abs_d] = True + if abs_d: + self.exclude_dirs[abs_d] = True exclude_str = "excluding dirs: %s" % ",".join(self.exclude_dirs.keys()) log.debug(exclude_str)