Skip to content

Commit

Permalink
fixed comma in float convertion
Browse files Browse the repository at this point in the history
  • Loading branch information
warenick committed Sep 23, 2021
1 parent 7ac609d commit 228b71a
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 228b71a

Please sign in to comment.