cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject cloudstack-cloudmonkey git commit: cloudmonkey: pep8-tify code
Date Fri, 22 May 2015 17:47:29 GMT
Repository: cloudstack-cloudmonkey
Updated Branches:
  refs/heads/master 758597c5f -> a7a1db63a


cloudmonkey: pep8-tify code

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


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

Branch: refs/heads/master
Commit: a7a1db63a121bb48366fed6f0532d17dc561a4df
Parents: 758597c
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Fri May 22 18:44:00 2015 +0100
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Fri May 22 18:44:00 2015 +0100

----------------------------------------------------------------------
 cloudmonkey/cloudmonkey.py | 7 ++++---
 cloudmonkey/requester.py   | 8 +++++---
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/a7a1db63/cloudmonkey/cloudmonkey.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/cloudmonkey.py b/cloudmonkey/cloudmonkey.py
index 6beb45d..4760439 100644
--- a/cloudmonkey/cloudmonkey.py
+++ b/cloudmonkey/cloudmonkey.py
@@ -58,7 +58,7 @@ normal_readline = True
 # Fix terminal env before importing readline
 # Without it, char ESC[?1034h gets printed in output
 # There is not TERM variable in some environment such as Docker.
-if not 'TERM' in os.environ or os.environ['TERM'].startswith('xterm'):
+if 'TERM' not in os.environ or os.environ['TERM'].startswith('xterm'):
     os.environ['TERM'] = 'vt100'
 try:
     import readline
@@ -117,7 +117,8 @@ class CloudMonkeyShell(cmd.Cmd, object):
     def init_credential_store(self):
         self.credentials = {'apikey': self.apikey, 'secretkey': self.secretkey,
                             'domain': self.domain, 'username': self.username,
-                            'password': self.password, 'signatureversion': self.signatureversion}
+                            'password': self.password,
+                            'signatureversion': self.signatureversion}
         parsed_url = urlparse(self.url)
         self.protocol = "http" if not parsed_url.scheme else parsed_url.scheme
         self.host = parsed_url.netloc
@@ -769,7 +770,7 @@ def main():
 
     parser.add_argument("-d", "--display-type",
                         dest="displayType", default=None,
-                        help="output display type, json, xml, table or default",
+                        help="output displays: json, xml, table or default",
                         choices=tuple(display_types))
 
     parser.add_argument("-p", "--profile",

http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/a7a1db63/cloudmonkey/requester.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/requester.py b/cloudmonkey/requester.py
index 4cf9d2a..f2c225c 100644
--- a/cloudmonkey/requester.py
+++ b/cloudmonkey/requester.py
@@ -159,7 +159,7 @@ def make_request_with_password(command, args, logger, url, credentials,
 
 
 def make_request(command, args, logger, url, credentials, expires,
-                 verifysslcert=False,signatureversion=3):
+                 verifysslcert=False, signatureversion=3):
     result = None
     error = None
 
@@ -248,13 +248,15 @@ def make_request(command, args, logger, url, credentials, expires,
 
 
 def monkeyrequest(command, args, isasync, asyncblock, logger, url,
-                  credentials, timeout, expires, verifysslcert=False, signatureversion=3):
+                  credentials, timeout, expires, verifysslcert=False,
+                  signatureversion=3):
     response = None
     error = None
     logger_debug(logger, "======== START Request ========")
     logger_debug(logger, "Requesting command=%s, args=%s" % (command, args))
     response, error = make_request(command, args, logger, url,
-                                   credentials, expires, verifysslcert, signatureversion)
+                                   credentials, expires, verifysslcert,
+                                   signatureversion)
 
     logger_debug(logger, "======== END Request ========\n")
 


Mime
View raw message