Skip to content

Commit 6b1c8fe

Browse files
pmkccopybara-github
authored andcommitted
Fix NPE when db_subnet_group_name is None.
PiperOrigin-RevId: 716292915
1 parent b8f7685 commit 6b1c8fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

perfkitbenchmarker/providers/aws/aws_relational_db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def _TeardownNetworking(self):
320320
"""Tears down all network resources that were created for the database."""
321321
for subnet_for_db in self.subnets_created:
322322
subnet_for_db.Delete()
323-
if hasattr(self, 'db_subnet_group_name'):
323+
if hasattr(self, 'db_subnet_group_name') and self.db_subnet_group_name:
324324
delete_db_subnet_group_cmd = util.AWS_PREFIX + [
325325
'rds',
326326
'delete-db-subnet-group',

0 commit comments

Comments
 (0)