Skip to content

Commit

Permalink
Adjust code for new pylint checks
Browse files Browse the repository at this point in the history
  • Loading branch information
fizyk committed Aug 25, 2020
1 parent b01c0cd commit 3a934f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pytest_postgresql/port.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def get_port(ports):
nums = set(filter_by_type(ports, int))
sets = set(chain.from_iterable(filter_by_type(ports, (set, frozenset))))
ports_set = ports_set.union(ranges, sets, nums)
except ValueError:
raise InvalidPortsDefinition
except ValueError as exc:
raise InvalidPortsDefinition from exc

return port_for.select_random(ports_set)

Expand Down

0 comments on commit 3a934f2

Please sign in to comment.