From 721c1d27ba14b442de82f09636f0c34456cf07d1 Mon Sep 17 00:00:00 2001 From: Junaid Ali Date: Wed, 27 Apr 2016 03:47:45 -0700 Subject: [PATCH] Updated restart_pg function --- hooks/pg_gw_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hooks/pg_gw_utils.py b/hooks/pg_gw_utils.py index 57a9632..8cfc815 100644 --- a/hooks/pg_gw_utils.py +++ b/hooks/pg_gw_utils.py @@ -158,7 +158,9 @@ def restart_pg(): if service_start('libvirt-bin'): time.sleep(3) if not service_running('plumgrid'): - raise ValueError("plumgrid service couldn't be started") + if not service_start('plumgrid'): + raise ValueError("plumgrid service couldn't be started" + ) else: raise ValueError("libvirt-bin service couldn't be started") status_set('active', 'Unit is ready')