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

error: unused process variable removed.

parent 721739e2
......@@ -35,13 +35,12 @@ class LogoutUser(managementagent.RabbitModule):
logger.debug('trying to kill user %s', username)
returnCode = subprocess.call(['/usr/bin/pkill', '-u', username, ' tl-xinit'])
process.wait()
time.sleep(5)
subprocess.call(['/usr/bin/pkill', '-u', username, '-KILL'])
if returnCode != 0:
logger.warning("Failed to logout user %s", username)
self.send_reply(reply_to, process.returncode, "Error executing pkill command (%i) for user %s" % (process.returncode, username))
self.send_reply(reply_to, returnCode, "Error executing pkill command (%i) for user %s" % (returnCode, username))
else:
logger.info("User %s logout succesfull", username)
self.send_reply(reply_to, 0, "Ended sessions 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