From 3e1f90882fd34da7cf50edd146dd3ea4f5961e8a Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 3 Mar 2014 15:48:33 -0500 Subject: [PATCH] Fix confetty client behavior when trying to show something that is 404 --- bin/confetty | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/confetty b/bin/confetty index b4845cd6..ce76df1d 100755 --- a/bin/confetty +++ b/bin/confetty @@ -198,6 +198,11 @@ def do_command(command, server): for item in res['item']: print item["href"] else: # generic attributes to list + if 'error' in res: + sys.stderr.write(res['error'] + '\n') + if 'errorcode' in res: + exitcode = res['errorcode'] + continue for key in res.iterkeys(): notes = [] if res[key] is None: @@ -219,7 +224,7 @@ def do_command(command, server): notes.append('Derived from expression "%s"' % res[key]['expression']) notestr = '(' + ', '.join(notes) + ')' output = '{0:<40} {1:>39}'.format(attrstr, notestr) - print output + print(output) elif argv[0] == 'start': targpath = fullpath_target(argv[1]) currconsole = targpath