Bouni / ard-mediathek

commandline download of ARD videos
MIT License
16 stars 3 forks source link

Script crashes with file name switch provided #9

Closed rriemann closed 5 years ago

rriemann commented 5 years ago

So I added the switch -f epsiode02.mp3 and go this error:

Destination path '' does not exist. Try to create it ...
Traceback (most recent call last):
  File "/home/rriemann/bin/ard-mediathek.py", line 106, in set_filename
    os.makedirs(os.path.dirname(filename))
  File "/usr/lib64/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
FileNotFoundError: [Errno 2] No such file or directory: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rriemann/bin/ard-mediathek.py", line 165, in <module>
    main(sys.argv)
  File "/home/rriemann/bin/ard-mediathek.py", line 157, in main
    amd.set_filename(args.filename)
  File "/home/rriemann/bin/ard-mediathek.py", line 108, in set_filename
    raise RuntimeError("The destination path could not be built. Aborting.")
RuntimeError: The destination path could not be built. Aborting.
Bouni commented 5 years ago

Fixed by #11