Skip to content

Commit

Permalink
chore: replace ops.main.main() with ops.main (#397)
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Belanger <[email protected]>
  • Loading branch information
gruyaume authored Oct 11, 2024
1 parent a6293c2 commit c79b0a5
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,17 @@
from lightkube.core.client import Client
from lightkube.models.meta_v1 import ObjectMeta
from lightkube.resources.core_v1 import Node, Pod
from ops import ActiveStatus, BlockedStatus, Container, ModelError, RemoveEvent, WaitingStatus
from ops import (
ActiveStatus,
BlockedStatus,
Container,
ModelError,
RemoveEvent,
WaitingStatus,
main,
)
from ops.charm import CharmBase, CollectStatusEvent
from ops.framework import EventBase
from ops.main import main
from ops.pebble import ChangeError, ConnectionError, ExecError, Layer, PathError

from charm_config import CharmConfig, CharmConfigInvalidError, CNIType, UpfMode
Expand Down Expand Up @@ -497,7 +504,7 @@ def _on_collect_unit_status(self, event: CollectStatusEvent): # noqa C901
if not path_exists(
container=self._pfcp_agent_container,
path=PFCP_AGENT_CONTAINER_CONFIG_PATH,
):
):
event.add_status(
WaitingStatus("Waiting for storage to be attached for pfcp-agent container")
)
Expand Down

0 comments on commit c79b0a5

Please sign in to comment.