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:
parent
e7a70f390e
commit
1cf472470e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user