summaryrefslogtreecommitdiff
path: root/heatclient/v1/shell.py
diff options
context:
space:
mode:
Diffstat (limited to 'heatclient/v1/shell.py')
-rw-r--r--heatclient/v1/shell.py3
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'),