Updated Branches:
  refs/heads/username_password_support 147ce1067 -> 28b9094b9


Fix flake8 errors as well. The remaining error is:
cloudmonkey.py:55:1: F401 'rlcompleter' imported but unused
possibly because this is a conditional import

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/28b9094b
Tree: 
http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/tree/28b9094b
Diff: 
http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/diff/28b9094b

Branch: refs/heads/username_password_support
Commit: 28b9094b91a47438e3148b6284f23998342b28d3
Parents: 147ce10
Author: Chiradeep Vittal <chirad...@apache.org>
Authored: Wed Oct 16 18:09:00 2013 -0700
Committer: Chiradeep Vittal <chirad...@apache.org>
Committed: Wed Oct 16 18:09:00 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/28b9094b/cloudmonkey/cloudmonkey.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/cloudmonkey.py b/cloudmonkey/cloudmonkey.py
index 5a3d1b3..8e1f46c 100644
--- a/cloudmonkey/cloudmonkey.py
+++ b/cloudmonkey/cloudmonkey.py
@@ -23,7 +23,6 @@ try:
     import json
     import logging
     import os
-    import pdb
     import shlex
     import sys
     import types
@@ -174,13 +173,12 @@ class CloudMonkeyShell(cmd.Cmd, object):
             if result_filter is not None:
                 for res in result_filter:
                     tfilter[res] = 1
-                myresults = {}
                 for okey, oval in result.iteritems():
                     if isinstance(oval, dict):
-                        for tkey in x:
+                        for tkey in oval:
                             if tkey not in tfilter:
                                 try:
-                                    del(tresult[okey][x][tkey])
+                                    del(tresult[okey][oval][tkey])
                                 except:
                                     pass
                     elif isinstance(oval, list):

http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/28b9094b/cloudmonkey/requester.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/requester.py b/cloudmonkey/requester.py
index d5c78a8..043a906 100644
--- a/cloudmonkey/requester.py
+++ b/cloudmonkey/requester.py
@@ -21,19 +21,13 @@ try:
     import base64
     import hashlib
     import hmac
-    import httplib
     import json
-    import os
-    import pdb
-    import re
     import requests
-    import shlex
     import sys
     import time
-    import types
     import urllib
     import urllib2
-    from urllib2 import urlopen, HTTPError, URLError
+    from urllib2 import HTTPError, URLError
 
 except ImportError, e:
     print "Import error in %s : %s" % (__name__, e)
@@ -206,7 +200,6 @@ def monkeyrequest(command, args, isasync, asyncblock, 
logger, host, port,
         try:
             response = json.loads(str(response))
         except ValueError, e:
-            error = "Error processing json response, %s" % e
             logger_debug(logger, "Error processing json: %s" % e)
 
         return response

Reply via email to