Updates:
Summary: Using Tidy with directory fails with an exception (unless using
--recursive)
Comment #1 on issue 1333 by pekka.klarck: Using Tidy with directory fails
with an exception (unless using --recursive)
http://code.google.com/p/robotframework/issues/detail?id=1333
--inplace isn't actually needed:
$ python -m robot.tidy foo
Unexpected error: AttributeError: 'NoneType' object has no attribute 'rfind'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/robot/tidy.py", line 186, in
main
output = tidy.file(*arguments)
File "/usr/local/lib/python2.7/dist-packages/robot/tidy.py", line 121, in
file
self._save_file(data, outfile)
File "/usr/local/lib/python2.7/dist-packages/robot/tidy.py", line 155, in
_save_file
data.save(output=output, **self._options)
File "/usr/local/lib/python2.7/dist-packages/robot/parsing/model.py",
line 114, in save
return DataFileWriter(**options).write(self)
File "/usr/local/lib/python2.7/dist-packages/robot/writer/datafilewriter.py",
line 41, in write
with WritingContext(datafile, **self._options) as ctx:
File "/usr/local/lib/python2.7/dist-packages/robot/writer/datafilewriter.py",
line 91, in __init__
self.format = self._validate_format(format) or self._format_from_file()
File "/usr/local/lib/python2.7/dist-packages/robot/writer/datafilewriter.py",
line 111, in _format_from_file
return self._format_from_extension(self._source_from_file())
File "/usr/local/lib/python2.7/dist-packages/robot/writer/datafilewriter.py",
line 114, in _format_from_extension
return os.path.splitext(path)[1][1:].lower()
File "/usr/lib/python2.7/posixpath.py", line 105, in splitext
return genericpath._splitext(p, sep, altsep, extsep)
File "/usr/lib/python2.7/genericpath.py", line 91, in _splitext
sepIndex = p.rfind(sep)