Updated Branches:
  refs/heads/username_password_support 180807d52 -> 08148ebbd


Logout when exiting the CLI

Signed-off-by: Chiradeep Vittal <chirad...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/commit/08148ebb
Tree: 
http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/tree/08148ebb
Diff: 
http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/diff/08148ebb

Branch: refs/heads/username_password_support
Commit: 08148ebbde06e58ba6d9aa79892b28e780d73635
Parents: 180807d
Author: Chiradeep Vittal <chirad...@apache.org>
Authored: Wed Oct 16 17:24:33 2013 -0700
Committer: Chiradeep Vittal <chirad...@apache.org>
Committed: Wed Oct 16 17:25:30 2013 -0700

----------------------------------------------------------------------
 cloudmonkey/cloudmonkey.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/08148ebb/cloudmonkey/cloudmonkey.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/cloudmonkey.py b/cloudmonkey/cloudmonkey.py
index 53ca066..9db225e 100644
--- a/cloudmonkey/cloudmonkey.py
+++ b/cloudmonkey/cloudmonkey.py
@@ -433,7 +433,7 @@ class CloudMonkeyShell(cmd.Cmd, object):
         Logout of session started with login with username and password
         """
         url = "%s://%s:%s%s" % (self.protocol, self.host, self.port, self.path)
-        logout(url, self.credentials['session'])
+        logout(url, self.credentials.get('session'))
         self.credentials['session'] = None
         self.credentials['sessionkey'] = None
 
@@ -508,6 +508,7 @@ class CloudMonkeyShell(cmd.Cmd, object):
         """
         Quit on Ctrl+d or EOF
         """
+        self.do_logout(None)
         sys.exit()
 
     def do_exit(self, args):

Reply via email to