Commit c8566099 authored by Benjamin Baer's avatar Benjamin Baer
Browse files

Returncode -1 replaced with actuall returncode.

parent dbc25730
......@@ -45,7 +45,7 @@ class LogoutUser(managementagent.RabbitModule):
if process.returncode != 0:
logger.warning("Failed to logout user %s", username)
self.send_reply(reply_to, -1, "Error executing pkill command (%i)" % (process.returncode,))
self.send_reply(reply_to, process.returncode, "Error executing pkill command (%i)" % (process.returncode,))
else:
logger.info("User %s logout succesfull", username)
self.send_reply(reply_to, 0, "Ended sessions for %s" % (username,))
......
......@@ -36,7 +36,7 @@ class RestartService(managementagent.RabbitModule):
if process.returncode != 0:
logger.warning("Failed to restart service %s", servicename)
self.send_reply(reply_to, -1, "Error executing service command (%i)" % (process.returncode,))
self.send_reply(reply_to, process.returncode, "Error executing service command (%i)" % (process.returncode,))
else:
logger.info("Service %s restarted successful", servicename)
self.send_reply(reply_to, 0, "Service %s restarted" % (servicename,))
......
......@@ -36,7 +36,7 @@ class Umount(managementagent.RabbitModule):
if process.returncode != 0:
logger.warning("Failed to umount directory %s", directory)
self.send_reply(reply_to, -1, "Error executing umount -f command (%i)" % (process.returncode,))
self.send_reply(reply_to, process.returncode, "Error executing umount -f command (%i)" % (process.returncode,))
else:
logger.info("Unmounting of the directory %s successful", directory)
self.send_reply(reply_to, 0, "umount -f %s successful" % (directory,))
......
......@@ -84,7 +84,7 @@ class UnlockScreensaver(managementagent.RabbitModule):
if process.returncode != 0:
logger.warning("Failed to unlocked screensaver for %s", username)
self.send_reply(reply_to, -1, "Error executing mate-screensaver-command (%i)" % (process.returncode,))
self.send_reply(reply_to, process.returncode, "Error executing mate-screensaver-command (%i)" % (process.returncode,))
else:
logger.info("Unlocked screensaver for %s", username)
self.send_reply(reply_to, 0, "Unlocked screen for %s" % (username,))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment