Skip to content

Commit a53c569

Browse files
committed
Fix broken --diff option after changeset 4721b9d; issue #169
1 parent 072e46c commit a53c569

2 files changed

Lines changed: 17 additions & 9 deletions

File tree

CHANGES.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ Changelog
22
=========
33

44

5+
1.4.x (unreleased)
6+
------------------
7+
8+
* Fix regression with the ``--diff`` option. (Issue #169)
9+
10+
511
1.4.3 (2013-02-22)
612
------------------
713

pep8.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
700 statements
4646
900 syntax error
4747
"""
48-
__version__ = '1.4.3'
48+
__version__ = '1.4.4a0'
4949

5050
import os
5151
import sys
@@ -1814,16 +1814,18 @@ def process_options(arglist=None, parse_argv=False, config_file=None,
18141814
args.append(options.testsuite)
18151815
elif not options.ensure_value('doctest', False):
18161816
if parse_argv and not args:
1817-
import select
1818-
# wait for 1 second on the stdin fd
1819-
reads, __, __ = select.select([sys.stdin], [], [], 1.)
1820-
if reads:
1821-
args = ['-']
1822-
elif options.diff or any(os.path.exists(name)
1823-
for name in PROJECT_CONFIG):
1817+
if options.diff:
18241818
args = ['.']
18251819
else:
1826-
parser.error('input not specified')
1820+
import select
1821+
# wait for 1 second on the stdin fd
1822+
reads, __, __ = select.select([sys.stdin], [], [], 1.)
1823+
if reads:
1824+
args = ['-']
1825+
elif any(os.path.exists(name) for name in PROJECT_CONFIG):
1826+
args = ['.']
1827+
else:
1828+
parser.error('input not specified')
18271829
options = read_config(options, args, arglist, parser)
18281830
options.reporter = parse_argv and options.quiet == 1 and FileReport
18291831

0 commit comments

Comments
 (0)