Skip to content

Commit 3a093f3

Browse files
committed
Use the exception chain to communicate unlikely system-level failures.
1 parent 01bcc9a commit 3a093f3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

postgresql/temporal.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,10 @@ def init(self,
124124
logfile = None,
125125
)
126126

127-
# Configure
128-
self.cluster_port = find_available_port()
129-
if self.cluster_port is None:
127+
try:
128+
self.cluster_port = find_available_port()
129+
except:
130+
# Rely on chain.
130131
raise ClusterError(
131132
'could not find a port for the test cluster on localhost',
132133
creator = cluster

0 commit comments

Comments
 (0)