Skip to content

Commit

Permalink
Add a try/except around the user_details.all_with_home (#103)
Browse files Browse the repository at this point in the history
(DIS-2385)
---------

Co-authored-by: Erik Schamper <[email protected]>
  • Loading branch information
Miauwkeru and Schamper authored Oct 18, 2023
1 parent d476709 commit 7d40982
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions acquire/acquire.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,12 @@ def misc_osx_user_homes(target: Target) -> Iterator[fsutil.TargetPath]:


def from_user_home(target: Target, path: str) -> Iterator[str]:
for user_details in target.user_details.all_with_home():
yield normalize_path(target, user_details.home_path.joinpath(path))
try:
for user_details in target.user_details.all_with_home():
yield normalize_path(target, user_details.home_path.joinpath(path))
except Exception as e:
log.warning("Error occurred when requesting all user homes")
log.debug("", exc_info=e)

misc_user_homes = MISC_MAPPING.get(target.os, misc_unix_user_homes)
for user_dir in misc_user_homes(target):
Expand Down

0 comments on commit 7d40982

Please sign in to comment.