iCHAIT / moviemon

:movie_camera: Everything about your movies within the command line.
https://ichait.github.io/moviemon/
MIT License
208 stars 16 forks source link

Moviemon crashes on broken symlinks #2

Open jody-frankowski opened 8 years ago

jody-frankowski commented 8 years ago

Moviemon doesn't handle well broken symlinks.

  File "/home/servo/.local/bin/moviemon", line 9, in <module>
    load_entry_point('moviemon==1.0.11', 'console_scripts', 'moviemon')()
  File "/home/servo/.local/lib/python3.5/site-packages/moviemon/moviemon.py", line 61, in main
    util(args)
  File "/home/servo/.local/lib/python3.5/site-packages/moviemon/moviemon.py", line 77, in util
    scan_dir(docopt_args["PATH"], dir_json)
  File "/home/servo/.local/lib/python3.5/site-packages/moviemon/moviemon.py", line 273, in scan_dir
    if os.path.getsize(path) > (25*1024*1024):
  File "/usr/lib/python3.5/genericpath.py", line 50, in getsize
    return os.stat(filename).st_size
FileNotFoundError: [Errno 2] No such file or directory: 'broken_symlink'