ZivaVatra/flac2all

Show filename on exception

Closed this issue · 3 comments

Not so much because there's an exception (these things happen, I don't care too much) but I would love to know which of the 400 files being converted was the target when the exception occurred on so I can evaluate the situation later.

The exception, for reference:

Exception in thread Thread-50:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(_self.__args, *_self.__kwargs)
File "/root/scriptbin/flac2all.py", line 678, in encode_thread
mp3Class.mp3convert(opts['lameopts'],current_file,outfile)
File "/root/scriptbin/flac2all.py", line 577, in mp3convert
encoder.write(line) #write it to the encoders buffer
IOError: [Errno 32] Broken pipe

This should be relatively simple to do, and as you say, helpful. v4 already has it, but v3 is lagging behind.

Latest master has the fix in place, give it a test and let me know if you find any problems. Thanks.

Will do, thank you so much for your time!