Skip to content

Commit

Permalink
remove string index to check full string
Browse files Browse the repository at this point in the history
  • Loading branch information
pgehring committed Oct 29, 2024
1 parent 640c948 commit 5c0b084
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions robmuxinator/robmuxinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,11 @@ def stop_session(self, session_name):
pid_session = None

if not returncode:
pid_session = stdout[0].rstrip("\n") if len(stdout) > 0 else None
pid_session = stdout.rstrip("\n") if len(stdout) > 0 else None
if pid_session:
cmd = "pgrep -P {}".format(pid_session)
returncode, stdout, stderr = self.send_cmd(cmd)
pid = stdout[0].rstrip("\n") if len(stdout) > 0 else None
pid = stdout.rstrip("\n") if len(stdout) > 0 else None
if not pid:
logger.error(f" session {session_name}: could not get process pid for session pid")
else:
Expand Down

0 comments on commit 5c0b084

Please sign in to comment.