added small prints, checked last final things, ready for production "testing"

i did more testing, but it can't really be shown because apparently I got it the first try 👍
This commit is contained in:
Xevion
2020-01-05 04:51:06 -06:00
parent 69c76599ad
commit 8642242f2a

View File

@@ -86,10 +86,10 @@ class YouTubeAudio(db.Model):
data = process.communicate() # Not the data for the mp3, just the output. We have to separate this in order to 'wait' for the process to complete fully.
print('Checking process return code...')
if process.returncode != 0:
raise CouldNotProcess(f'Command: {command}\n{data[1]}Exit Code: {process.returncode}')
raise CouldNotProcess(f'Command: {command}\n{data[1] or data[0]}Exit Code: {process.returncode}')
print('Checking for expected file...')
if not os.path.exists(self.getPath()):
raise CouldNotDownload(data[1])
raise CouldNotDownload(data[1] or data[0])
print(f'Download attempt for {self.id} finished successfully.')
# Validates whether the specified ID could be a valid YouTube video ID