def register_class(acct_class):
"""Call once for each account class. This method adds the class to the dictionaries used to look up account classes by shell and type."""
shell_acct_class[acct_class.SHELL] = acct_class
def register_class(acct_class):
"""Call once for each account class. This method adds the class to the dictionaries used to look up account classes by shell and type."""
shell_acct_class[acct_class.SHELL] = acct_class
def __init__(self, name):
self.name = name # username
self._acct = None # the account object currently associated with this worker
def __init__(self, name):
self.name = name # username
self._acct = None # the account object currently associated with this worker
next_class = type_acct_class[rec['type']]
if next_class != curr_class:
self._destroy(curr_class)
next_class = type_acct_class[rec['type']]
if next_class != curr_class:
self._destroy(curr_class)
if not isinstance(self._acct, next_class): self._acct = next_class(rec)
if startingup or \
not self.is_running() or \
if not isinstance(self._acct, next_class): self._acct = next_class(rec)
if startingup or \
not self.is_running() or \