Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffxy committed Sep 23, 2024
1 parent 9306de4 commit 6c5e56d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/brad/provisioning/athena.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def create_s3_bucket(self):
print("Bucket {} created successfully.".format(self._bucket_name))
except ClientError as e:
e_str = f"{e}"
# pylint: disable-next=unsupported-membership-test
if "BucketAlready" in e_str:
print("Workgroup {} already exists.".format(self._athena_id))
return
Expand All @@ -49,6 +50,7 @@ def create_workgroup(self):
print(f"Workgroup Results: {response}!")
except ClientError as e:
e_str = f"{e}"
# pylint: disable-next=unsupported-membership-test
if "WorkGroup is already" in e_str:
print("Workgroup {} already exists.".format(self._athena_id))
return
Expand Down
3 changes: 3 additions & 0 deletions src/brad/provisioning/rds.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ def reconcile_cluster_state(self):
)
except Exception as e:
e_str = f"{e}"
# pylint: disable-next=unsupported-membership-test
if "AlreadyExists" in e_str:
continue
else:
Expand Down Expand Up @@ -400,6 +401,7 @@ def get_or_create_instance(self, instance_id):
continue
except Exception as e:
e_str = f"{e}"
# pylint: disable-next=unsupported-membership-test
if "AlreadyExists" in e_str:
print("Rds Instance already exists...")
time.sleep(5.0)
Expand All @@ -417,6 +419,7 @@ def kill_instance_if_exists(self, instance_id):
)
except Exception as e:
e_str = f"{e}"
# pylint: disable-next=unsupported-membership-test
if "NotFound" in e_str:
print(f"Rds Instance {instance_id} already does not exits.")
return
Expand Down
1 change: 1 addition & 0 deletions src/brad/provisioning/redshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ def redeploy(self, is_classic: bool):
continue
except Exception as e:
e_str = f"{e}"
# pylint: disable-next=unsupported-membership-test
if "NotFound" in e_str:
# Create First.
logging.info(f"Redshift Cluster {self.cluster_name}. Creating...")
Expand Down

0 comments on commit 6c5e56d

Please sign in to comment.