From fb1e20906e7d6d3aeaa8e0e2f0df111c57713e72 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 15 Mar 2016 11:15:15 -0400 Subject: [PATCH] Do not worry over non-existant debug socket If the socket was not created, do not error on exit because it isn't there to be cleaned up. --- confluent_server/confluent/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/main.py b/confluent_server/confluent/main.py index 432c1746..9acc7cb2 100644 --- a/confluent_server/confluent/main.py +++ b/confluent_server/confluent/main.py @@ -134,7 +134,10 @@ def dumptrace(signalname, frame): def doexit(): if not havefcntl: return - os.remove('/var/run/confluent/dbg.sock') + try: + os.remove('/var/run/confluent/dbg.sock') + except OSError: + pass pidfile = open('/var/run/confluent/pid') pid = pidfile.read() if pid == str(os.getpid()):