Bug 706946 - [abrt] python-pep8-0.6.0-2.fc14: pep8.py:723:readlines:IOError: [Errno 2] No such file or directory: 'com'
Summary: [abrt] python-pep8-0.6.0-2.fc14: pep8.py:723:readlines:IOError: [Errno 2] No ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pep8
Version: 14
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ian Weller
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:a6bde974
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-23 14:56 UTC by Pierre-YvesChibon
Modified: 2012-06-17 19:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-16 21:53:51 UTC
Type: ---


Attachments (Terms of Use)
File: backtrace (753 bytes, text/plain)
2011-05-23 14:56 UTC, Pierre-YvesChibon
no flags Details

Description Pierre-YvesChibon 2011-05-23 14:56:40 UTC
abrt version: 1.1.18
architecture: x86_64
cmdline: /usr/bin/python /usr/bin/pep8 com
component: python-pep8
executable: /usr/bin/pep8
kernel: 2.6.35.13-91.fc14.x86_64
package: python-pep8-0.6.0-2.fc14
reason: pep8.py:723:readlines:IOError: [Errno 2] No such file or directory: 'com'
release: Fedora release 14 (Laughlin)
time: 1306162496
uid: 500

backtrace
-----
pep8.py:723:readlines:IOError: [Errno 2] No such file or directory: 'com'

Traceback (most recent call last):
  File "/usr/bin/pep8", line 9, in <module>
    load_entry_point('pep8==0.6.0', 'console_scripts', 'pep8')()
  File "/usr/lib/python2.7/site-packages/pep8.py", line 1346, in _main
    runner(path)
  File "/usr/lib/python2.7/site-packages/pep8.py", line 1027, in input_file
    errors = Checker(filename).check_all()
  File "/usr/lib/python2.7/site-packages/pep8.py", line 827, in __init__
    self.lines = readlines(filename)
  File "/usr/lib/python2.7/site-packages/pep8.py", line 723, in readlines
    return open(filename).readlines()
IOError: [Errno 2] No such file or directory: 'com'

Local variables in innermost frame:
filename: 'com'

comment
-----
I tried to run pep8 on a "compare.py" but the tab completion blocked and I ran pep8 only on "com".

Pep8 should catch the exception if the file against which one try to run it doesn't exist.

For example:
$ pep8 blasdlkjalfhvhdnvuhbad

How to reproduce
-----
1. run pep8 with an invalid argument
2.
3.

Comment 1 Pierre-YvesChibon 2011-05-23 14:56:43 UTC
Created attachment 500452 [details]
File: backtrace

Comment 2 Pierre-YvesChibon 2012-06-17 08:55:53 UTC
Hey Ian, may I ask why this resolution ?

Comment 3 Ian Weller 2012-06-17 19:06:26 UTC
Because I don't think it's a bug :)

The exception very plainly says what's going on, it's meant to be a command line application used by Python developers that understand exceptions, and the only reason it's here is because abrt caught it because it's an exception.

If you believe catching the exception is trivial, please send a patch upstream.


Note You need to log in before you can comment on or make changes to this bug.