Skip to content

Commit a74fe18

Browse files
committed
Adjust for python 3.7 where missing_ok isn't available
1 parent 2377a85 commit a74fe18

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/resources/httpinfo.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ class HTTPUnixServer(HTTPServer):
3838
args = ap.parse_args()
3939

4040
if args.unix_socket:
41-
Path(args.unix_socket).unlink(missing_ok=True)
41+
unix_socket = Path(args.unix_socket)
42+
if unix_socket.exists():
43+
unix_socket.unlink()
4244
httpd = HTTPUnixServer(args.unix_socket, EchoRequestInfo)
4345
else:
4446
httpd = HTTPServer(('127.0.0.1', args.port), EchoRequestInfo)

0 commit comments

Comments
 (0)