Skip to content

Commit 13d0adc

Browse files
committed
Don't prompt users to create an app if runtime=0
1 parent aa3532a commit 13d0adc

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

client/deis.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1535,8 +1535,11 @@ def nodes_scale(self, args):
15351535
"""
15361536
formation = args.get('<formation>')
15371537
body = {}
1538+
runtimes = True
15381539
for type_num in args.get('<type=num>'):
15391540
typ, count = type_num.split('=')
1541+
if (typ, count) == ('runtime', '0'):
1542+
runtimes = False
15401543
body.update({typ: int(count)})
15411544
print('Scaling nodes... but first, coffee!')
15421545
try:
@@ -1551,7 +1554,9 @@ def nodes_scale(self, args):
15511554
progress.join()
15521555
if response.status_code == requests.codes.ok: # @UndefinedVariable
15531556
print('done in {}s\n'.format(int(time.time() - before)))
1554-
print('Use `deis create --formation={}` to create an application'.format(formation))
1557+
if runtimes:
1558+
print('Use `deis create --formation={}` to create an application'.format(
1559+
formation))
15551560
else:
15561561
raise ResponseError(response)
15571562

0 commit comments

Comments
 (0)