diff --git a/src/waitress/trigger.py b/src/waitress/trigger.py index 24c4d0d6..4fc26434 100644 --- a/src/waitress/trigger.py +++ b/src/waitress/trigger.py @@ -174,7 +174,7 @@ def __init__(self, map): w.connect(connect_address) break # success except OSError as detail: - if detail[0] != errno.WSAEADDRINUSE: + if getattr('winerror', detail, 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.