Continue if exclude-dir doesn't exist, just log warning.

This commit is contained in:
Kelsey Prantis 2012-05-04 15:17:12 -06:00
parent de9264c323
commit 2c17f9e911
1 changed files with 3 additions and 2 deletions

View File

@ -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)