Commit 03ab49e5 authored by Marco Mariani's avatar Marco Mariani

instantiate supervisor rpc just before using

parent b66f584e
...@@ -489,9 +489,9 @@ class Partition(object): ...@@ -489,9 +489,9 @@ class Partition(object):
def stop(self): def stop(self):
"""Asks supervisord to stop the instance.""" """Asks supervisord to stop the instance."""
supervisor = self.getSupervisorRPC()
partition_id = self.computer_partition.getId() partition_id = self.computer_partition.getId()
try: try:
supervisor = self.getSupervisorRPC()
supervisor.stopProcessGroup(partition_id, False) supervisor.stopProcessGroup(partition_id, False)
except xmlrpclib.Fault, e: except xmlrpclib.Fault, e:
if e.faultString.startswith('BAD_NAME:'): if e.faultString.startswith('BAD_NAME:'):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment