From 28a127b61967b0d64b629ce85b724b6a13c8500f Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 14 Dec 2018 19:04:37 +0000 Subject: [PATCH] Safely create base socket dir --- catfish/utils/sockets.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/catfish/utils/sockets.py b/catfish/utils/sockets.py index cc1e8e6..eb52a26 100644 --- a/catfish/utils/sockets.py +++ b/catfish/utils/sockets.py @@ -28,7 +28,10 @@ def read_all_from_socket(socket): def create_base_socket_dir(): - os.mkdir(BASE_SOCKET_DIR) + try: + os.mkdir(BASE_SOCKET_DIR) + except FileExistsError: + pass def delete_base_socket_dir():