From 8642242f2af868029d1c8fbbd0859984a10c59be Mon Sep 17 00:00:00 2001 From: Xevion Date: Sun, 5 Jan 2020 04:51:06 -0600 Subject: [PATCH] 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 :+1: --- app/sound_models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/sound_models.py b/app/sound_models.py index c5502e0..fe4870c 100644 --- a/app/sound_models.py +++ b/app/sound_models.py @@ -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