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):