Commit 8e68c8f6 authored by Vincent Pelletier's avatar Vincent Pelletier

Do not rely on initializeConnection side-effect on related classes.

This side-effect was removed in "Pass connection helper as a constructor
parameter, not as class property." commit on slapos.core repository
(hash = c2d5a1eb5d256ef580b1afd34633413adee23e8c).
parent 7d5db931
...@@ -6,7 +6,7 @@ from datetime import datetime ...@@ -6,7 +6,7 @@ from datetime import datetime
from datetime import timedelta from datetime import timedelta
import xmlrpclib import xmlrpclib
from logging import getLogger, basicConfig from logging import getLogger, basicConfig
from slapos.slap import slap, Supply from slapos.slap import slap
from slapos.grid.utils import setRunning, setFinished from slapos.grid.utils import setRunning, setFinished
def safeRpcCall(proxy, function_id, *args): def safeRpcCall(proxy, function_id, *args):
...@@ -52,9 +52,9 @@ class Agent: ...@@ -52,9 +52,9 @@ class Agent:
basicConfig(filename=filename, format="%(asctime)-15s %(message)s", level="INFO") basicConfig(filename=filename, format="%(asctime)-15s %(message)s", level="INFO")
self.logger = getLogger() self.logger = getLogger()
self.slap = slap() self.slap = slap = slap()
self.slap.initializeConnection(master_url, key_file, cert_file) slap.initializeConnection(master_url, key_file, cert_file)
self.supply = Supply() self.supply = slap.registerSupply()
state = ConfigParser.SafeConfigParser() state = ConfigParser.SafeConfigParser()
state.readfp(open(self.state_file)) state.readfp(open(self.state_file))
......
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