File: tests-catch-DockerException-on-detection.patch

package info (click to toggle)
labgrid 0.4.1-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,232 kB
  • sloc: python: 17,045; makefile: 30; sh: 12
file content (22 lines) | stat: -rw-r--r-- 556 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: Bastian Germann <bage@debian.org>
Date: Tue, 28 Sep 2021 02:37:20 +0200
Subject: tests: catch DockerException on detection
Forwarded: no

---
 tests/test_docker.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/test_docker.py b/tests/test_docker.py
index e68de4e..b5be4c2 100644
--- a/tests/test_docker.py
+++ b/tests/test_docker.py
@@ -21,6 +21,8 @@ def check_external_progs_present():
         dock.info()
     except OSError:
         return False
+    except docker.errors.DockerException:
+        return False
     return True