From 404d87477173218408bd0688a63251709f2fc508 Mon Sep 17 00:00:00 2001 From: fluzzi Date: Tue, 18 Apr 2023 18:00:43 -0300 Subject: [PATCH] bug fix --- connpy/_version.py | 2 +- connpy/api.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/connpy/_version.py b/connpy/_version.py index 9e2f1ac..ca2ef48 100644 --- a/connpy/_version.py +++ b/connpy/_version.py @@ -1,2 +1,2 @@ -__version__ = "3.0.6" +__version__ = "3.0.7" diff --git a/connpy/api.py b/connpy/api.py index 431dd8d..2b5cd01 100644 --- a/connpy/api.py +++ b/connpy/api.py @@ -115,7 +115,10 @@ def stop_api(): print("Connpy api server is not running.") return # Send a SIGTERM signal to the process - os.kill(pid, signal.SIGTERM) + try: + os.kill(pid, signal.SIGTERM) + except: + pass # Delete the PID file os.remove(PID_FILE) print(f"Server with process ID {pid} stopped.")