Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/zip-output
Browse files Browse the repository at this point in the history
Schamper authored Oct 25, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 1f6b677 + 7d40982 commit 44646f0
Showing 3 changed files with 16 additions and 2 deletions.
8 changes: 6 additions & 2 deletions acquire/acquire.py
Original file line number Diff line number Diff line change
@@ -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):
5 changes: 5 additions & 0 deletions tests/test_collector.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import errno
import platform
from pathlib import Path
from unittest.mock import MagicMock, Mock, patch

@@ -328,6 +329,10 @@ def collect_report(
return collector.report


@pytest.mark.skipif(
platform.system() == "Windows",
reason="No files are collected on Windows. Needs to be fixed.",
)
@pytest.mark.parametrize(
"function_name, collection_point, expected_results, create_paths",
[
5 changes: 5 additions & 0 deletions tests/test_outputs_dir.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import platform
from pathlib import Path

import pytest
@@ -29,6 +30,10 @@ def leaves(path: Path) -> list[Path]:
return leave_paths


@pytest.mark.skipif(
platform.system() == "Windows",
reason="entry_name comparison uses the wrong path separators on Windows. Needs to befixed.",
)
@pytest.mark.parametrize(
"entry_name",
[

0 comments on commit 44646f0

Please sign in to comment.