2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 19:10:10 +00:00

Add warning if someone tries attach with a file

Rather than bother the server, sort out the problem locally.
This commit is contained in:
Jarrod Johnson 2018-01-24 13:23:35 -05:00
parent e7a70f390e
commit 1cf472470e

View File

@ -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)