From 475c38c941b80afb10ab2dc4a114de9a2dcf1e09 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Wed, 14 Mar 2012 21:16:15 -0400 Subject: [PATCH] Modules don't have to return JSON, key=value pairs is ok. --- copy | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/copy b/copy index 632df966486..dcb339d2746 100755 --- a/copy +++ b/copy @@ -22,11 +22,6 @@ import sys import os import shlex -try: - import json -except ImportError: - import simplejson as json - # =========================================== # convert arguments of form a=b c=d # to a dictionary @@ -51,10 +46,7 @@ dest = params['dest'] # raise an error if there is no src file if not os.path.exists(src): - print json.dumps({ - "failed" : 1, - "msg" : "Source %s failed to transfer" % src - }) + print "failed=1 msg='Source %s failed to transfer'" % src sys.exit(1) md5sum = None @@ -70,9 +62,6 @@ if md5sum != md5sum2: changed = True # mission accomplished -print json.dumps({ - "md5sum" : md5sum2, - "changed" : changed -}) +print "md5sum=%s changed=%s" % (md5sum2, changed)