Kaydet (Commit) ee35fed6 authored tarafından Bahadır Kandemir's avatar Bahadır Kandemir

strip() first line

üst 037c047b
...@@ -124,7 +124,7 @@ def _getPid(pidfile): ...@@ -124,7 +124,7 @@ def _getPid(pidfile):
raise raise
return None return None
# Some services put custom data after the first line # Some services put custom data after the first line
pid = pid.split("\n")[0] pid = pid.split("\n")[0].strip()
# Non-pid data is also seen when stopped state in some services :/ # Non-pid data is also seen when stopped state in some services :/
if len(pid) == 0 or len(filter(lambda x: not x in "0123456789", pid)) > 0: if len(pid) == 0 or len(filter(lambda x: not x in "0123456789", pid)) > 0:
return None return None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment