Here is an idea for a patch – but I am not sure if it actually works:
--- /usr/share/pyshared/landscape/lib/sysstats.py.orig 2012-07-26 15:26:42.000000000 +0000 +++ /usr/share/pyshared/landscape/lib/sysstats.py 2012-07-26 15:32:38.000000000 +0000 @@ -55,6 +55,13 @@ class MemoryStats(object): def get_logged_in_users(): result = getProcessOutputAndValue("who", ["-q"], env=os.environ)
+ def logged_in_users_err_callback(result): + """ Errback from getProcessOutputAndValue """ + out, err, code = result + raise Exception("Error getting users exited %d with error: %s (%s)" % (code, err, out)) + + result.addErrback(logged_in_users_err_callback) + def parse_output((stdout_data, stderr_data, status)): if status != 0: raise CommandError(stderr_data)
Here is an idea for a patch – but I am not sure if it actually works:
--- /usr/share/ pyshared/ landscape/ lib/sysstats. py.orig 2012-07-26 15:26:42.000000000 +0000 pyshared/ landscape/ lib/sysstats. py 2012-07-26 15:32:38.000000000 +0000 object) : in_users( ): tAndValue( "who", ["-q"], env=os.environ)
+++ /usr/share/
@@ -55,6 +55,13 @@ class MemoryStats(
def get_logged_
result = getProcessOutpu
+ def logged_ in_users_ err_callback( result) : tAndValue """ addErrback( logged_ in_users_ err_callback) (stdout_ data, stderr_data, status)): stderr_ data)
+ """ Errback from getProcessOutpu
+ out, err, code = result
+ raise Exception("Error getting users exited %d with error: %s (%s)" % (code, err, out))
+
+ result.
+
def parse_output(
if status != 0:
raise CommandError(