diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2019-01-28 07:01:35 -0800 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2019-01-28 11:15:06 -0500 |
| commit | 7785e03ba89aafbd949191f126361fb9103cb980 (patch) | |
| tree | 5776f7063604285445cfcebf6efb42fd5d063f60 /tests/servers | |
| parent | 7444f3252757ed4384623e5afd7dcfeef3e0c74e (diff) | |
Fixed #30137 -- Replaced OSError aliases with the canonical OSError.
Used more specific errors (e.g. FileExistsError) as appropriate.
Diffstat (limited to 'tests/servers')
| -rw-r--r-- | tests/servers/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/servers/tests.py b/tests/servers/tests.py index 7f75b85d6c..1f111fb5ae 100644 --- a/tests/servers/tests.py +++ b/tests/servers/tests.py @@ -194,10 +194,10 @@ class LiveServerPort(LiveServerBase): TestCase = type("TestCase", (LiveServerBase,), {}) try: TestCase.setUpClass() - except socket.error as e: + except OSError as e: if e.errno == errno.EADDRINUSE: # We're out of ports, LiveServerTestCase correctly fails with - # a socket error. + # an OSError. return # Unexpected error. raise |
