From 69ed7884436981fce1f7ddf581b0beab765ee2e2 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Thu, 9 Oct 2014 14:24:45 -0500 Subject: [PATCH] When run as a setuptools command, the previous fix breaks flake8 --- flake8/engine.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flake8/engine.py b/flake8/engine.py index f21e804..f2b7ce0 100644 --- a/flake8/engine.py +++ b/flake8/engine.py @@ -91,6 +91,12 @@ def get_style_guide(**kwargs): kwargs['parser'], options_hooks = get_parser() styleguide = StyleGuide(**kwargs) options = styleguide.options + + if options.exclude and not isinstance(options.exclude, list): + options.exclude = pep8.normalize_paths(options.exclude) + else: + options.exclude = [] + # Add pattersn in EXTRA_EXCLUDE to the list of excluded patterns options.exclude.extend(pep8.normalize_paths(EXTRA_EXCLUDE))