From ce62847426594207f9f0fdb2a9adae81fd4e1f1c Mon Sep 17 00:00:00 2001 From: Tony Meyer Date: Fri, 27 Sep 2024 12:10:53 +1200 Subject: [PATCH] docs: use MaintenanceStatus for local issues (#1397) `WaitingStatus` should be used when waiting on an integrated charm. `MaintenanceStatus` should be used when waiting for something local to the charm. We missed an example in `can_connect()` when clarifying the statuses earlier in the year. --- ops/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ops/model.py b/ops/model.py index 14c44b92f..fc7523096 100644 --- a/ops/model.py +++ b/ops/model.py @@ -2352,7 +2352,7 @@ def can_connect(self) -> bool: # Check that Pebble is still reachable now. container = self.unit.get_container("example") if not container.can_connect(): - event.add_status(ops.WaitingStatus("Waiting for Pebble...")) + event.add_status(ops.MaintenanceStatus("Waiting for Pebble...")) """ try: self._pebble.get_system_info()