From c8f266b637c1ec8c8a017d18d4f2bf4339055ae0 Mon Sep 17 00:00:00 2001 From: Jean Praloran Date: Wed, 16 Dec 2015 08:19:28 +1300 Subject: [PATCH] add restarting status for human_readable_state Signed-off-by: Jean Praloran --- compose/container.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compose/container.py b/compose/container.py index 1ca483809..8f96a9447 100644 --- a/compose/container.py +++ b/compose/container.py @@ -115,6 +115,8 @@ class Container(object): def human_readable_state(self): if self.is_paused: return 'Paused' + if self.is_restarting: + return 'Restarting' if self.is_running: return 'Ghost' if self.get('State.Ghost') else 'Up' else: @@ -134,6 +136,10 @@ class Container(object): def is_running(self): return self.get('State.Running') + @property + def is_restarting(self): + return self.get('State.Restarting') + @property def is_paused(self): return self.get('State.Paused')