Skip to content

Commit 26a2e78

Browse files
committed
feat(fistpoint): add a warning in case of error while disabling
Signed-off-by: Damien Thenot <damien.thenot@vates.tech>
1 parent 8f7a980 commit 26a2e78

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/fistpoint.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import logging
22

3+
from lib.commands import SSHCommandFailed
34
from lib.host import Host
45

56
from typing import Final
@@ -58,7 +59,11 @@ def enable(self):
5859

5960
def disable(self):
6061
logging.info(f"Disabling fistpoint {self.fistpointName}")
61-
self.host.ssh(["rm", self._get_path(self.fistpointName)])
62+
try:
63+
self.host.ssh(["rm", self._get_path(self.fistpointName)])
64+
except SSHCommandFailed as e:
65+
logging.info(f"Failed trying to disable fistpoint {self._get_path(self.fistpointName)} with error {e}")
66+
raise
6267

6368
def __enter__(self):
6469
self.enable()

0 commit comments

Comments
 (0)