Skip to content

Commit

Permalink
fix try int() except blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
cognifloyd committed Nov 8, 2024
1 parent cb48e3d commit e97b7d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions st2tests/st2tests/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ def _override_db_opts():

try:
port = int(port_raw)
except ValueError:
except (TypeError, ValueError):
port = None

try:
connection_timeout = int(connection_timeout_raw)
except ValueError:
except (TypeError, ValueError):
connection_timeout = None

CONF.set_override(name="db_name", override=db_name, group="database")
Expand Down Expand Up @@ -220,12 +220,12 @@ def _override_coordinator_opts(noop=False):

try:
redis_port = int(redis_port_raw)
except ValueError:
except (TypeError, ValueError):
redis_port = 6379

try:
redis_db = int(redis_db_raw)
except ValueError:
except (TypeError, ValueError):
redis_db = -1

driver = f"{scheme}://"
Expand Down

0 comments on commit e97b7d2

Please sign in to comment.