From fef795d067f7a02ba2939389f104c0845e995214 Mon Sep 17 00:00:00 2001 From: draper <27962761+Drapersniper@users.noreply.github.com> Date: Fri, 18 Feb 2022 15:13:32 +0000 Subject: [PATCH] [minor] Catch `TypeError` when building an Arr instance and build an invalid path when required --- qBitrr/arss.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qBitrr/arss.py b/qBitrr/arss.py index 6cb71ce1..9d47b07b 100644 --- a/qBitrr/arss.py +++ b/qBitrr/arss.py @@ -204,7 +204,9 @@ def __init__( if self.search_missing and arr_db_file is None: self.logger.critical("Arr DB file not specified setting SearchMissing to False") self.search_missing = False - self.arr_db_file = pathlib.Path(arr_db_file) + self.arr_db_file = pathlib.Path("/.Invalid Place Holder") + else: + self.arr_db_file = pathlib.Path(arr_db_file) self._app_data_folder = APPDATA_FOLDER self.search_db_file = self._app_data_folder.joinpath(f"{self._name}.db") if self.search_missing and not self.arr_db_file.exists(): @@ -3324,7 +3326,7 @@ def build_arr_instances(self): self.logger.exception(e) except SkipException: continue - except OSError as e: + except (OSError, TypeError) as e: self.logger.exception(e) for cat in self.special_categories: managed_object = PlaceHolderArr(cat, self)