This commit is contained in:
2022-01-20 14:00:36 +00:00
parent 736612e259
commit 90a84e2020

View File

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