Skip to content

Commit

Permalink
fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Mar 14, 2025
1 parent 407713c commit bea9255
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions local-app/python-tools/gfl-resource-actions/managers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
Base resource manager class that provides common functionality.
"""
import datetime
from aws_utils import create_boto3_client_for_account, get_partition_for_region
import boto3
import config
from logging_utils import setup_logging
from aws_utils import get_partition_for_region
from logging_utils import setup_logging, log_action_to_csv

logger = setup_logging()

Expand Down Expand Up @@ -38,6 +39,7 @@ def create_client(self, service, region):
aws_session_token=self.credentials['SessionToken']
)

# Use aws_utils function directly rather than duplicating logic
def get_partition_for_region(self, region):
"""Get AWS partition for the specified region."""
return get_partition_for_region(region)
Expand Down Expand Up @@ -86,6 +88,7 @@ def log_action(self, resource_id, region, action, resource_name=None, details=No
if existing_schedule:
message += f" (Schedule: {existing_schedule})"

# Use logging_utils.log_action_to_csv for consistent CSV logging across the application
log_action_to_csv(
account_id=self.account_id,
account_name=self.account_name,
Expand Down

0 comments on commit bea9255

Please sign in to comment.