Skip to content

Commit 25e1c3c

Browse files
committed
Make flake8 happy
Signed-off-by: Matthias Büchse <[email protected]>
1 parent ebb775d commit 25e1c3c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def delete_security_group(conn, sg_id):
9090
conn.network.find_security_group(name_or_id=sg_id)
9191
except ResourceNotFound:
9292
logger.debug(f"Security group {sg_id} was deleted successfully.")
93-
except Exception as e:
93+
except Exception:
9494
logger.critical(f"Security group {sg_id} was not deleted successfully")
9595
raise
9696

@@ -107,12 +107,12 @@ def altern_test_rules(connection: openstack.connection.Connection):
107107
def test_rules(connection: openstack.connection.Connection):
108108
try:
109109
rules = list(connection.network.default_security_group_rules())
110-
except ResourceNotFound as e:
110+
except ResourceNotFound:
111111
logger.info(
112112
"API call failed. OpenStack components might not be up to date. "
113113
"Falling back to old-style test method. "
114114
)
115-
logger.debug(f"traceback", exc_info=True)
115+
logger.debug("traceback", exc_info=True)
116116
altern_test_rules(connection)
117117
else:
118118
check_default_rules(rules)
@@ -129,7 +129,7 @@ def handle(self, record):
129129

130130
def main():
131131
parser = argparse.ArgumentParser(
132-
description="SCS Default Security Group Rules Checker"
132+
description="SCS Default Security Group Rules Checker",
133133
)
134134
parser.add_argument(
135135
"--os-cloud",
@@ -138,7 +138,7 @@ def main():
138138
"to the OS_CLOUD environment variable",
139139
)
140140
parser.add_argument(
141-
"--debug", action="store_true", help="Enable OpenStack SDK debug logging"
141+
"--debug", action="store_true", help="Enable debug logging",
142142
)
143143
args = parser.parse_args()
144144
openstack.enable_logging(debug=args.debug)

0 commit comments

Comments
 (0)