summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt3
-rwxr-xr-xpep8.py3
2 files changed, 5 insertions, 1 deletions
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):