Created
January 29, 2013 04:23
-
-
Save alq666/4661780 to your computer and use it in GitHub Desktop.
To fix a locale issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/checks/system/unix.py b/checks/system/unix.py | |
index 5ebc6b2..8be6c5c 100644 | |
--- a/checks/system/unix.py | |
+++ b/checks/system/unix.py | |
@@ -626,7 +626,7 @@ class Cpu(Check): | |
def get_value(legend, data, name): | |
"Using the legend and a metric name, get the value or None from the data line" | |
if name in legend: | |
- return float(data[legend.index(name)]) | |
+ return float(data[legend.index(name)].replace(",", ".")) | |
else: | |
# FIXME return a float or False, would trigger type error if not python | |
self.logger.debug("Cannot extract cpu value %s from %s (%s)" % (name, data, legend)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To apply this patch: