From 6086f61c90c38b5ceb0bf1f473a382fb36f664b1 Mon Sep 17 00:00:00 2001 From: Ian Lee Date: Sat, 7 Feb 2015 12:25:16 -0800 Subject: Fix undefined variable issue; #377 --- CHANGES.txt | 3 +++ pep8.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 6482343..76cf1c8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,6 +5,9 @@ Changelog 1.6.x (unreleased) ------------------ +Bugs: + +* Exception thrown due to unassigned ``local_dir`` variable. (Issue #377) 1.6.0 (2015-02-06) ------------------ diff --git a/pep8.py b/pep8.py index a583836..e58662f 100755 --- a/pep8.py +++ b/pep8.py @@ -1938,6 +1938,8 @@ def read_config(options, args, arglist, parser): cli_conf = options.config + local_dir = os.curdir + if cli_conf and os.path.isfile(cli_conf): if options.verbose: print('cli configuration: %s' % cli_conf) @@ -1948,7 +1950,6 @@ def read_config(options, args, arglist, parser): print('user configuration: %s' % USER_CONFIG) config.read(USER_CONFIG) - local_dir = os.curdir parent = tail = args and os.path.abspath(os.path.commonprefix(args)) while tail: if config.read(os.path.join(parent, fn) for fn in PROJECT_CONFIG): -- cgit v1.2.1