syntax checker fails when python file does not exist yet

Bug #926996 reported by Curtis Hovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gedit Developer Plugins
Fix Released
High
Curtis Hovey

Bug Description

The a new python file is is checked, pep8 dies.

Traceback (most recent call last):
  File "/home/curtis/.local/share/gedit/plugins/gdp/format.py", line 321, in check_style
    self._check_style(document)
  File "/home/curtis/.local/share/gedit/plugins/gdp/format.py", line 313, in _check_style
    checker.check()
  File "/usr/lib/pymodules/python2.7/pocketlint/formatcheck.py", line 293, in check
    checker.check()
  File "/usr/lib/pymodules/python2.7/pocketlint/formatcheck.py", line 502, in check
    self.check_pep8()
  File "/usr/lib/pymodules/python2.7/pocketlint/formatcheck.py", line 535, in check_pep8
    pep8.Checker(self.file_path).check_all()
  File "/usr/lib/pymodules/python2.7/pocketlint/contrib/pep8.py", line 827, in __init__
    self.lines = readlines(filename)
  File "/usr/lib/pymodules/python2.7/pocketlint/contrib/pep8.py", line 723, in readlines
    return open(filename).readlines()
IOError: [Errno 2] No such file or directory: '/home/curtis/Work/test.py'

Curtis Hovey (sinzui)
Changed in gdp:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in gdp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.