--- a/Plugins/CheckerPlugins/Pep8/Pep8Fixer.py Thu May 12 19:56:33 2011 +0200 +++ b/Plugins/CheckerPlugins/Pep8/Pep8Fixer.py Fri May 13 18:25:13 2011 +0200 @@ -113,15 +113,16 @@ """ Public method to fix the fixable issues. - @param line line number of issue (integer or string) - @param pos character position of issue (integer or string) + @param line line number of issue (integer) + @param pos character position of issue (integer) @param message message text (string) @return flag indicating an applied fix (boolean) and a message for the fix (string) """ code = message.split(None, 1)[0].strip() - if (code in self.__fixCodes or len(self.__fixCodes) == 0) and \ + if line <= len(self.__source) and \ + (code in self.__fixCodes or len(self.__fixCodes) == 0) and \ code in self.__fixes: res = self.__fixes[code](code, line, pos) if res[0]: