dbr / tvnamer

Automatic TV episode file renamer, uses data from thetvdb.com via tvdb_api
https://pypi.python.org/pypi/tvnamer/
The Unlicense
912 stars 115 forks source link

Crash when searching without permissions #15

Closed SDERAWI closed 13 years ago

SDERAWI commented 13 years ago
Traceback (most recent call last):
  File "/usr/bin/tvnamer", line 9, in <module>
    load_entry_point('tvnamer==2.0', 'console_scripts', 'tvnamer')()
  File "/usr/lib/python2.7/site-packages/tvnamer/main.py", line 351, in main
    tvnamer(paths = sorted(args))
  File "/usr/lib/python2.7/site-packages/tvnamer/main.py", line 245, in tvnamer
    for cfile in findFiles(paths):
  File "/usr/lib/python2.7/site-packages/tvnamer/main.py", line 216, in findFiles
    valid_files.extend(cur.findFiles())
  File "/usr/lib/python2.7/site-packages/tvnamer/utils.py", line 196, in findFiles
    return self._findFilesInPath(self.path)
  File "/usr/lib/python2.7/site-packages/tvnamer/utils.py", line 225, in _findFilesInPath
    allfiles.extend(self._findFilesInPath(newpath))
  File "/usr/lib/python2.7/site-packages/tvnamer/utils.py", line 216, in _findFilesInPath
    for subf in os.listdir(unicode(startpath)):
OSError: [Errno 13] Permission denied: '/boot/lost+found'
dbr commented 13 years ago

Fixed, thanks! Inaccessible files will be skipped, and a message printed in verbose mode

SDERAWI commented 13 years ago

That was fast !!! , thank you