From 1cf472470e7c81de5ccc954f41fec0e48280a62e Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 24 Jan 2018 13:23:35 -0500 Subject: [PATCH] Add warning if someone tries attach with a file Rather than bother the server, sort out the problem locally. --- confluent_client/bin/nodemedia | 3 +++ 1 file changed, 3 insertions(+) diff --git a/confluent_client/bin/nodemedia b/confluent_client/bin/nodemedia index 396f0b85..a98592db 100644 --- a/confluent_client/bin/nodemedia +++ b/confluent_client/bin/nodemedia @@ -63,6 +63,9 @@ def printerror(res, node=None): def attach_media(noderange, media): global exitcode session = client.Command() + if ':' not in media: + sys.stderr.write('Full URL required for attach') + sys.exit(1) resource = '/noderange/{0}/media/attach'.format(noderange) for res in session.update(resource, {'url': media}): printerror(res)