From 90a84e2020de3f0d7fbdee10cc9333c893416fe9 Mon Sep 17 00:00:00 2001 From: Marcio Fernandes Date: Thu, 20 Jan 2022 14:00:36 +0000 Subject: [PATCH] . --- onlyone/__init__.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/onlyone/__init__.py b/onlyone/__init__.py index 58354ab..75d30da 100644 --- a/onlyone/__init__.py +++ b/onlyone/__init__.py @@ -8,8 +8,21 @@ log = logging.getLogger(__name__) def __is_process(cmd:str, arr): item = " ".join(arr) - if(item.endswith(cmd) or item.endswith(cmd.replace("\"", "")) or item == cmd or item == cmd.replace("\"", "")): + log.info("[onlyone][startprocess] -> " + item + "ends with " + cmd) + if(item.endswith(cmd)): return True + + log.info("[onlyone][startprocess] -> " + item + "ends with " + cmd.replace("\"", "")) + if(item.endswith(cmd.replace("\"", ""))): + return True + log.info("[onlyone][startprocess] -> " + item + " eq " + cmd) + if(item == cmd): + return True + log.info("[onlyone][startprocess] -> " + item + " eq " + cmd.replace("\"", "")) + if(item == cmd.replace("\"", "")): + return True + + log.info("compare finished not equal") return False def isrunning(cmd:str):