fixed cleanup for non-unixsocket configs

This commit is contained in:
Devaev Maxim 2018-12-16 01:58:35 +03:00
parent 88bbdf322f
commit e5dfc9e306

View File

@ -37,7 +37,7 @@ def main() -> None:
except subprocess.CalledProcessError: except subprocess.CalledProcessError:
pass pass
unix_path = config["server"]["unix"] unix_path = config["server"].get("unix", "")
if unix_path and os.path.exists(unix_path): if unix_path and os.path.exists(unix_path):
logger.info("Removing socket %r ...", unix_path) logger.info("Removing socket %r ...", unix_path)
os.remove(unix_path) os.remove(unix_path)