diff --git a/0004-tests-Hide-intermediate-error-in-output-checker.patch b/0004-tests-Hide-intermediate-error-in-output-checker.patch new file mode 100644 index 0000000..59b4e5c --- /dev/null +++ b/0004-tests-Hide-intermediate-error-in-output-checker.patch @@ -0,0 +1,39 @@ +From 27b618a93ede3df5224d5d7f90155d901029953b Mon Sep 17 00:00:00 2001 +From: Benjamin Berg +Date: Tue, 10 May 2022 09:50:10 +0200 +Subject: [PATCH 04/14] tests: Hide intermediate error in output checker + +The output checker raises from an exception handler. Add the appropriate +"from None" to hide that intermediate exception. +--- + tests/output_checker.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tests/output_checker.py b/tests/output_checker.py +index 265e323..d1a8c4c 100644 +--- a/tests/output_checker.py ++++ b/tests/output_checker.py +@@ -98,16 +98,16 @@ class OutputChecker(object): + # EOF, throw error + if self._pipe_fd_r == -1: + if failmsg: +- raise AssertionError("No further messages: " % failmsg) ++ raise AssertionError("No further messages: " % failmsg) from None + else: +- raise AssertionError('No client waiting for needle %s' % (str(needle_re))) ++ raise AssertionError('No client waiting for needle %s' % (str(needle_re))) from None + + # Check if should wake up + if not self._lines_sem.acquire(timeout = deadline - time.time()): + if failmsg: +- raise AssertionError(failmsg) ++ raise AssertionError(failmsg) from None + else: +- raise AssertionError('Timed out waiting for needle %s (timeout: %0.2f)' % (str(needle_re), timeout)) ++ raise AssertionError('Timed out waiting for needle %s (timeout: %0.2f)' % (str(needle_re), timeout)) from None + continue + + ret.append(l) +-- +2.37.1.windows.1 + diff --git a/fprintd.spec b/fprintd.spec index 2c21456..15974ac 100644 --- a/fprintd.spec +++ b/fprintd.spec @@ -1,6 +1,6 @@ Name: fprintd Version: 1.94.2 -Release: 4 +Release: 5 Summary: D-Bus service for Fingerprint reader access License: GPLv2+ @@ -10,6 +10,7 @@ ExcludeArch: s390 s390x Patch0001: 0001-Don-t-try-to-clear-storage-on-devices-without-intern.patch Patch0002: 0002-tests-Fix-dbusmock-AddDevice-calls-to-include-option.patch Patch0003: 0003-meson-Do-not-hard-require-test-dependencies.patch +Patch0004: 0004-tests-Hide-intermediate-error-in-output-checker.patch BuildRequires: meson BuildRequires: gcc @@ -96,6 +97,9 @@ fi %{_mandir}/man8/pam_fprintd.8.gz %changelog +* Thu Jan 05 2023 xuxinyu - 1.94.2-5 +- tests: Hide intermediate error in output checker + * Thu Jan 05 2023 xuxinyu - 1.94.2-4 - meson: Do not hard-require test dependencies