cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chirad...@apache.org
Subject [09/11] git commit: PEP8 cleanup
Date Wed, 23 Apr 2014 23:59:21 GMT
PEP8 cleanup


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

Branch: refs/heads/master
Commit: 0586e8cbad1e99ac815200a419d3fa8e1e0878b0
Parents: 8812bfb
Author: Chiradeep Vittal <chiradeep@apache.org>
Authored: Wed Apr 23 15:25:55 2014 -0700
Committer: Chiradeep Vittal <chiradeep@apache.org>
Committed: Wed Apr 23 15:42:00 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/0586e8cb/cloudmonkey/cloudmonkey.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/cloudmonkey.py b/cloudmonkey/cloudmonkey.py
index baf017d..dedbb3e 100644
--- a/cloudmonkey/cloudmonkey.py
+++ b/cloudmonkey/cloudmonkey.py
@@ -257,7 +257,8 @@ class CloudMonkeyShell(cmd.Cmd, object):
                                         self.asyncblock, logger,
                                         self.host, self.port,
                                         self.credentials,
-                                        self.timeout, self.protocol, self.path, self.expires)
+                                        self.timeout, self.protocol,
+                                        self.path, self.expires)
         if error is not None:
             self.monkeyprint(error)
         return response
@@ -484,8 +485,9 @@ class CloudMonkeyShell(cmd.Cmd, object):
                     helpdoc += "\nRequired params are %s" % ' '.join(required)
                 helpdoc += "\nParameters\n" + "=" * 10
                 for param in api['params']:
-                    helpdoc += "\n%s = (%s) %s" % (param['name'],
-                               param['type'], param['description'])
+                    helpdoc += "\n%s = (%s) %s" % (
+                               param['name'], param['type'],
+                               param['description'])
                 self.monkeyprint(helpdoc)
             else:
                 self.monkeyprint("Error: no such api (%s) on %s" %

http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/0586e8cb/cloudmonkey/requester.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/requester.py b/cloudmonkey/requester.py
index b55061f..612b9cc 100644
--- a/cloudmonkey/requester.py
+++ b/cloudmonkey/requester.py
@@ -96,7 +96,7 @@ def make_request_with_password(command, args, logger, url, credentials):
         session = credentials.get('session')
         tries += 1
 
-        #obtain a valid session if not supplied
+        # obtain a valid session if not supplied
         if not (session and sessionkey):
             session, sessionkey = login(url, username, password)
             if not (session and sessionkey):
@@ -106,7 +106,7 @@ def make_request_with_password(command, args, logger, url, credentials):
 
         args['sessionkey'] = sessionkey
 
-        #make the api call
+        # make the api call
         resp = session.get(url, params=args)
         result = resp.text
         logger_debug(logger, "Response received: %s" % resp.text)
@@ -146,8 +146,8 @@ def make_request(command, args, logger, host, port,
     expirationtime = datetime.utcnow() + timedelta(seconds=int(expires))
     args["expires"] = expirationtime.strftime('%Y-%m-%dT%H:%M:%S+0000')
 
-    #try to use the apikey/secretkey method by default
-    #if not present, use the username/password method
+    # try to use the apikey/secretkey method by default
+    # if not present, use the username/password method
     if not credentials['apikey']:
         url = "%s://%s:%s%s" % (protocol, host, port, path)
         return make_request_with_password(command, args,
@@ -245,8 +245,8 @@ def monkeyrequest(command, args, isasync, asyncblock, logger, host, port,
             jobstatus = result['jobstatus']
             if jobstatus == 2:
                 jobresult = result["jobresult"]
-                error = "\rAsync job %s failed\nError %s, %s" % (jobid,
-                        jobresult["errorcode"], jobresult["errortext"])
+                error = "\rAsync job %s failed\nError %s, %s" % (
+                        jobid, jobresult["errorcode"], jobresult["errortext"])
                 return response, error
             elif jobstatus == 1:
                 print "\r" + " " * progress,


Mime
View raw message