diff --git a/airtime_mvc/application/modules/rest/controllers/MediaController.php b/airtime_mvc/application/modules/rest/controllers/MediaController.php index d9416548c..a91f150a6 100644 --- a/airtime_mvc/application/modules/rest/controllers/MediaController.php +++ b/airtime_mvc/application/modules/rest/controllers/MediaController.php @@ -237,7 +237,7 @@ class Rest_MediaController extends Zend_Rest_Controller //as a foreign key to cc_music_dirs. if (isset($requestData["full_path"])) { $fileSizeBytes = filesize($requestData["full_path"]); - if ($fileSizeBytes === false) + if (!isset($fileSizeBytes) || $fileSizeBytes === false) { $file->setDbImportStatus(self::IMPORT_STATUS_FAILED)->save(); $this->fileNotFoundResponse(); diff --git a/python_apps/airtime_analyzer/airtime_analyzer/status_reporter.py b/python_apps/airtime_analyzer/airtime_analyzer/status_reporter.py index 17be62118..9c2d52a31 100644 --- a/python_apps/airtime_analyzer/airtime_analyzer/status_reporter.py +++ b/python_apps/airtime_analyzer/airtime_analyzer/status_reporter.py @@ -85,6 +85,7 @@ def process_http_requests(ipc_queue, http_retry_queue_path): # while the web server is down or unreachable. with open(http_retry_queue_path, 'wb') as pickle_file: pickle.dump(retry_queue, pickle_file) + return except Exception as e: # Terrible top-level exception handler to prevent the thread from dying, just in case. if shutdown: return