Fixed temp dir conflict

Fixed invalid validator

Change-Id: I72d6e00d895a0fb360d3d05da9b44e0e63322869
This commit is contained in:
Martin Magr
2013-02-12 19:29:28 +01:00
parent 624d49a0e8
commit 0e7a1aec8e
8 changed files with 79 additions and 51 deletions

View File

@@ -13,7 +13,7 @@ class Controller(object):
MESSAGES=[]
CONF={}
__single = None # the one, true Singleton
__single = None # the one, true Singleton ... for god's sake why ??? :)
def __new__(self, *args, **kwargs):
"""
@@ -22,12 +22,17 @@ class Controller(object):
which means that we will not invoke this singleton if someone tries to create a new
instance from a class which inherit Controller.
did not use isinstance because inheritence makes it behave erratically.
"""
"""
if self != type(self.__single):
self.__single = object.__new__(self, *args, **kwargs)
return self.__single
def __init__(self): pass
def __init__(self):
# XXX: Right now this will only hold all temp dirs on each host.
# Method for temp dir creation should be implemented in this
# class, when it will start behaving like controller and not
# only like data container
self.temp_map = {}
# PLugins
def addPlugin(self, plugObj):