summaryrefslogtreecommitdiff
path: root/src/waitress/trigger.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/waitress/trigger.py')
-rw-r--r--src/waitress/trigger.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/waitress/trigger.py b/src/waitress/trigger.py
index 3b1ad46..49b2034 100644
--- a/src/waitress/trigger.py
+++ b/src/waitress/trigger.py
@@ -173,7 +173,7 @@ else: # pragma: no cover
w.connect(connect_address)
break # success
except OSError as detail:
- if detail[0] != errno.WSAEADDRINUSE:
+ if getattr(detail, "winerror", None) != errno.WSAEADDRINUSE:
# "Address already in use" is the only error
# I've seen on two WinXP Pro SP2 boxes, under
# Pythons 2.3.5 and 2.4.1.