Skip to content

Commit

Permalink
Merge pull request #87 from warenick/main
Browse files Browse the repository at this point in the history
fixed comma in float convertion
  • Loading branch information
dheera authored Sep 24, 2021
2 parents 7ac609d + 228b71a commit 86cfa55
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rosboard/subscribers/processes_subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,11 @@ def start(self):

if fields is None:
continue

output.append({
"pid": int(line[fields["PID"][0] : fields["PID"][1]]),
"user": line[fields["USER"][0] : fields["USER"][1]].strip(),
"cpu": float(line[fields["%CPU"][0] : fields["%CPU"][1]]),
"mem": float(line[fields["%MEM"][0] : fields["%MEM"][1]]),
"cpu": float(line[fields["%CPU"][0] : fields["%CPU"][1]].replace(',','.')),
"mem": float(line[fields["%MEM"][0] : fields["%MEM"][1]].replace(',','.')),
"command": line[fields["COMMAND"][0] : ].strip(),
})

Expand Down

0 comments on commit 86cfa55

Please sign in to comment.