Skip to content

Commit 7cf0800

Browse files
committed
successful exception
Signed-off-by: Katharina Trentau <[email protected]>
1 parent 0d321d4 commit 7cf0800

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Tests/iaas/security-groups/default-security-group-rules.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,10 @@ def create_security_group(conn, sg_name: str = SG_NAME, description: str = DESCR
123123

124124
def delete_security_group(conn, sg_id):
125125
conn.network.delete_security_group(sg_id)
126+
# in case of a successful delete finding the sg will throw an exception
126127
try:
127128
conn.network.find_security_group(name_or_id=sg_id)
128-
except Exception:
129+
except ResourceNotFound:
129130
print(f"Security group {sg_id} was deleted successfully.")
130131

131132

0 commit comments

Comments
 (0)