Skip to content

Commit

Permalink
removing f-string
Browse files Browse the repository at this point in the history
  • Loading branch information
Brad Duncan committed Feb 26, 2024
1 parent 6fb399b commit c22f04c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions library/file_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def write_deleted_users_to_s3(s3_client, deleted_users, bucket_name=None, s3_key
:param s3_key: The S3 key (file path within the bucket) for the file, optional
"""
if not bucket_name or not s3_key:
print(f"Skipping writing to S3 as either bucket_name or s3_key has not been set...")
print("Skipping writing to S3 as either bucket_name or s3_key has not been set...")
return

# Convert the list of deleted users to a string, one username per line
Expand All @@ -18,7 +18,6 @@ def write_deleted_users_to_s3(s3_client, deleted_users, bucket_name=None, s3_key
try:
# Proceed to write the string to a file in S3
s3_client.put_object(Bucket=bucket_name, Key=s3_key, Body=deleted_users_str)
print("Successfully wrote deleted users to {s3_key} in bucket {bucket_name}.")
print(f"Successfully wrote deleted users to {s3_key} in bucket {bucket_name}.")
except Exception as e:
print(f"Failed to write deleted users to S3: {e}")

print(f"Failed to write deleted users to S3: {e}")

0 comments on commit c22f04c

Please sign in to comment.