aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2024-04-17 10:47:21 +0200
committerThéo de la Hogue2024-04-17 10:47:21 +0200
commit0e6ac153c868992958526513698e406b00bac8fd (patch)
tree0fb7d5d1b454e9467f793344eaa908b85d9d2d41
parent18634286c8b126f061a18433d5c893f25a3cec49 (diff)
downloadargaze-0e6ac153c868992958526513698e406b00bac8fd.zip
argaze-0e6ac153c868992958526513698e406b00bac8fd.tar.gz
argaze-0e6ac153c868992958526513698e406b00bac8fd.tar.bz2
argaze-0e6ac153c868992958526513698e406b00bac8fd.tar.xz
Fixing no pipe case.
-rw-r--r--src/argaze/__main__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/argaze/__main__.py b/src/argaze/__main__.py
index 127baa8..9bcbe5a 100644
--- a/src/argaze/__main__.py
+++ b/src/argaze/__main__.py
@@ -66,7 +66,7 @@ with load(args.context_file) as context:
cv2.namedWindow(context.name, cv2.WINDOW_AUTOSIZE)
# Waiting for 'ctrl+C' interruption
- with contextlib.suppress(KeyboardInterrupt), os.fdopen(pipe_file) as pipe:
+ with contextlib.suppress(KeyboardInterrupt), os.fdopen(pipe_file) if args.pipe_path is not None else contextlib.nullcontext() as pipe:
# Visualization loop
while True: