Skip to content

Commit ff8a84e

Browse files
systemvm: fix proc.find in CsProcess.py (#4413)
Co-authored-by: Wei Zhou <w.zhou@global.leaseweb.com>
1 parent 15954fe commit ff8a84e

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

systemvm/debian/opt/cloud/bin/cs/CsApp.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
# under the License.
1818
import os
1919
from CsFile import CsFile
20-
from CsProcess import CsProcess
2120
import CsHelper
2221

2322

systemvm/debian/opt/cloud/bin/cs/CsProcess.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ def kill_all(self):
4040

4141
def find_pid(self):
4242
self.pid = []
43+
items = len(self.search)
4344
for i in CsHelper.execute("ps aux"):
44-
items = len(self.search)
45-
proc = re.split(r"\s+", i)[items*-1:]
45+
proc = re.split(r"\s+", i)[10:]
4646
matches = len([m for m in proc if m in self.search])
4747
if matches == items:
4848
self.pid.append(re.split(r"\s+", i)[1])

0 commit comments

Comments
 (0)