You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2014/10/31 10:34:14 UTC
[2/3] git commit: requester: stderr and json loads fixes
requester: stderr and json loads fixes
Signed-off-by: Rohit Yadav <ro...@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/a1e1023e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/tree/a1e1023e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/diff/a1e1023e
Branch: refs/heads/master
Commit: a1e1023e04f7878e901d98af658ce3d9242fa214
Parents: fd32746
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Fri Oct 31 14:59:09 2014 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Fri Oct 31 14:59:09 2014 +0530
----------------------------------------------------------------------
cloudmonkey/requester.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/a1e1023e/cloudmonkey/requester.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/requester.py b/cloudmonkey/requester.py
index 91b61a2..eaf9de9 100644
--- a/cloudmonkey/requester.py
+++ b/cloudmonkey/requester.py
@@ -43,6 +43,7 @@ def logger_debug(logger, message):
def writeError(msg):
sys.stderr.write(msg)
+ sys.stderr.write("\n")
def login(url, username, password):
@@ -218,7 +219,7 @@ def monkeyrequest(command, args, isasync, asyncblock, logger, url,
def process_json(response):
try:
- response = json.loads(unicode(response))
+ response = json.loads(response, "utf-8")
except ValueError, e:
logger_debug(logger, "Error processing json: %s" % e)
writeError("Error processing json: %s" % e)