Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

Commit

Permalink
[minor] Catch TypeError when building an Arr instance and build an …
Browse files Browse the repository at this point in the history
…invalid path when required
  • Loading branch information
Drapersniper committed Feb 18, 2022
1 parent 73e0fd8 commit fef795d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qBitrr/arss.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit fef795d

Please sign in to comment.