Skip to content

Commit c2951f9

Browse files
committed
Showing containers for the correct app when running scale --app=X. Fixes #481
1 parent 51a3c42 commit c2951f9

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

client/deis.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -888,15 +888,16 @@ def containers(self, args):
888888
"""
889889
return self.containers_list(args)
890890

891-
def containers_list(self, args):
891+
def containers_list(self, args, app=None):
892892
"""
893893
List containers servicing an application
894894
895895
Usage: deis containers:list [--app=<app>]
896896
"""
897-
app = args.get('--app')
898897
if not app:
899-
app = self._session.get_app()
898+
app = args.get('--app')
899+
if not app:
900+
app = self._session.get_app()
900901
response = self._dispatch('get',
901902
"/api/apps/{}/containers".format(app))
902903
if response.status_code != requests.codes.ok: # @UndefinedVariable
@@ -947,7 +948,7 @@ def containers_scale(self, args):
947948
progress.join()
948949
if response.status_code == requests.codes.ok: # @UndefinedVariable
949950
print('done in {}s\n'.format(int(time.time() - before)))
950-
self.containers_list({})
951+
self.containers_list({}, app)
951952
else:
952953
raise ResponseError(response)
953954

0 commit comments

Comments
 (0)