Commit e78866ed authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Jim Harris
Browse files

scripts/rpc.py: add parentheses to all print calls



This is necessary for rpc.py to work with Python 3.

Change-Id: I34d411090532ccc2603473ded20119681f8aa85a
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404433


Reviewed-by: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
parent 0126c9ce
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ except ImportError:


def print_array(a):
    print " ".join((quote(v) for v in a))
    print(" ".join((quote(v) for v in a)))


if __name__ == "__main__":
+7 −7
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ import time


def print_dict(d):
    print json.dumps(d, indent=2)
    print(json.dumps(d, indent=2))


class JSONRPCClient(object):
@@ -70,17 +70,17 @@ class JSONRPCClient(object):
            if method == "kill_instance":
                exit(0)
            if closed:
                print "Connection closed with partial response:"
                print("Connection closed with partial response:")
            else:
                print "Timeout while waiting for response:"
            print buf
                print("Timeout while waiting for response:")
            print(buf)
            exit(1)

        if 'error' in response:
            print "Got JSON-RPC error response"
            print "request:"
            print("Got JSON-RPC error response")
            print("request:")
            print_dict(json.loads(reqstr))
            print "response:"
            print("response:")
            print_dict(response['error'])
            exit(1)