destroy_sem = threading.Semaphore(1)
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."""
+ """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
type_acct_class[acct_class.TYPE] = acct_class
self._acct = None # the account object currently associated with this worker
def ensure_created(self, rec, startingup = Startingup):
- """Check account type is still valid. If not, recreate sliver. If still valid,
- check if running and configure/start if not."""
+ """Check account type is still valid. If not, recreate sliver.
+If still valid, check if running and configure/start if not."""
curr_class = self._get_class()
next_class = type_acct_class[rec['type']]
if next_class != curr_class: