summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunaid Ali <junaidali@plumgrid.com>2016-04-27 20:54:49 -0700
committerJunaid Ali <junaidali@plumgrid.com>2016-04-27 20:54:49 -0700
commit02ace9b01803046571bffa9019199bc5dbc6a33a (patch)
tree6f9435de1bb3b9f3e5d3e0d5ff565cc378775b8d
parent721c1d27ba14b442de82f09636f0c34456cf07d1 (diff)
Updated restart_pg function
-rw-r--r--hooks/pg_gw_utils.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/hooks/pg_gw_utils.py b/hooks/pg_gw_utils.py
index 8cfc815..48c1571 100644
--- a/hooks/pg_gw_utils.py
+++ b/hooks/pg_gw_utils.py
@@ -157,10 +157,9 @@ def restart_pg():
157 else: 157 else:
158 if service_start('libvirt-bin'): 158 if service_start('libvirt-bin'):
159 time.sleep(3) 159 time.sleep(3)
160 if not service_running('plumgrid'): 160 if not service_running('plumgrid') \
161 if not service_start('plumgrid'): 161 and not service_start('plumgrid'):
162 raise ValueError("plumgrid service couldn't be started" 162 raise ValueError("plumgrid service couldn't be started")
163 )
164 else: 163 else:
165 raise ValueError("libvirt-bin service couldn't be started") 164 raise ValueError("libvirt-bin service couldn't be started")
166 status_set('active', 'Unit is ready') 165 status_set('active', 'Unit is ready')