top plugin does not work for locales not using dot as decimal point

Bug #1082469 reported by Luca Falavigna
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kupfer
Fix Committed
Undecided
Unassigned

Bug Description

Forwarded from http://bugs.debian.org/680008

$ LC_MESSAGES=en_GB.utf8 LC_NUMERIC=cs_CZ.utf8 kupfer
Kupfer: A free software (GPLv3+) launcher
 Copyright © 2007--2011 Ulrik Sverdrup with others
 http://kaizer.se/wiki/kupfer/

[kupfer.ui.browser] WindowController: Trying to register <Ctrl>space to spawn kupfer.. success
Traceback (most recent call last):
  File "/usr/share/kupfer/kupfer/utils.py", line 172, in _child_callback
    self.finish_callback(self, "".join(self.stdout), "".join(self.stderr))
  File "/usr/share/kupfer/kupfer/plugin/top.py", line 116, in _async_top_finished
    processes = sorted(processes, key=operator.itemgetter(4))
  File "/usr/share/kupfer/kupfer/plugin/top.py", line 182, in parse_top_output
    yield (int(pid), float(cpu), float(mem), ptime, cmd)
ValueError: invalid literal for float(): 42,2

If I select "Running Tasks" I get: "Running Tasks is empty".

Attached patch invokes top with LC_NUMERIC=C set in environment.

Revision history for this message
Luca Falavigna (dktrkranz) wrote :
Revision history for this message
Karol Będkowski (karol-bedkowski) wrote :

Hi,
Thanks for submit this patch.

Changed in kupfer:
status: New → Confirmed
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.