From 06f22e7acb1c8b11c6b4d2e7a4a37c0213195e4a Mon Sep 17 00:00:00 2001 From: Juliana Motira Date: Wed, 14 Oct 2015 09:53:14 -0300 Subject: [PATCH] Fix unix socket dir creation --- confluent_server/confluent/sockapi.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/sockapi.py b/confluent_server/confluent/sockapi.py index 9a67c3ca..d075070f 100644 --- a/confluent_server/confluent/sockapi.py +++ b/confluent_server/confluent/sockapi.py @@ -17,7 +17,7 @@ # This is the socket api layer. # It implement unix and tls sockets -# +# import atexit import errno @@ -271,6 +271,8 @@ def _unixdomainhandler(): os.remove("/var/run/confluent/api.sock") except OSError: # if file does not exist, no big deal pass + if not os.path.isdir("/var/run/confluent"): + os.makedirs('/var/run/confluent', 0755) unixsocket.bind("/var/run/confluent/api.sock") os.chmod("/var/run/confluent/api.sock", stat.S_IWOTH | stat.S_IROTH | stat.S_IWGRP |