We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8089522 commit 825ec09Copy full SHA for 825ec09
ocp_resources/resource.py
@@ -6,6 +6,7 @@
6
import os
7
import re
8
import sys
9
+import threading
10
from collections.abc import Callable, Generator
11
from io import StringIO
12
from signal import SIGINT, signal
@@ -582,7 +583,8 @@ def to_dict(self) -> None:
582
583
self._base_body()
584
585
def __enter__(self) -> Any:
- signal(SIGINT, self._sigint_handler)
586
+ if threading.current_thread().native_id == threading.main_thread().native_id:
587
+ signal(SIGINT, self._sigint_handler)
588
return self.deploy(wait=self.wait_for_resource)
589
590
def __exit__(
0 commit comments