diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-02-15 05:41:33 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-02-15 05:41:33 +0000 |
commit | c78437d33a0f836c731d6395fed55bb5e38fef0c (patch) | |
tree | 29b7aa84d05ddf785f6c0d9ef4d841a4fe92809c /heatclient/v1/shell.py | |
parent | 73df57ecdf5a302fa73cd707f281ec0c78b29adf (diff) | |
parent | c2d40fe05c373428ff4edd04904aec5152a0b695 (diff) | |
download | python-heatclient-c78437d33a0f836c731d6395fed55bb5e38fef0c.tar.gz |
Merge "Validate for empty file for stack-adopt"
Diffstat (limited to 'heatclient/v1/shell.py')
-rw-r--r-- | heatclient/v1/shell.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/heatclient/v1/shell.py b/heatclient/v1/shell.py index e791b76..0a119b4 100644 --- a/heatclient/v1/shell.py +++ b/heatclient/v1/shell.py @@ -177,6 +177,9 @@ def do_stack_adopt(hc, args): adopt_url = utils.normalise_file_path_to_url(args.adopt_file) adopt_data = request.urlopen(adopt_url).read() + if not len(adopt_data): + raise exc.CommandError('Invalid adopt-file, no data!') + if args.create_timeout: logger.warning(_LW('%(arg1)s is deprecated, ' 'please use %(arg2)s instead'), |