old_contents: #
  #faults are changes in state of code.
  #
  #
  
  
  ## system crtical changes will be added here
  
  
  def setupMachineFaults():
      pass
  
  
  class Registor(object):
  
      faultBases = {}
      def __init__(self,system):
          pass
  
      def registerDevice():
          return __addBase()
  
      def __addBase(self,clsName,keys=None):
          faultBases[clsName] = FaultBase()
          return faultBases[clsName]
  
      def initalizeFaults(faultkeys):
          faults = dict.fromkeys(faultkeys,[]) || {'general' : []}
  
      def trigger(fault):
          for callback in faults[fault.key]
              callback(fault.key, fault.value)
  
  class FaultBase(object):
      faults = {}
      def addSubscriber(key,callback):
          if key in faults
              faults[key].append(callback)
          else
              faults[key] = []
              faults[key].append(callback)
      def removeRemove:
          #del 
  
  
  
  def logError():
      pass
  def logInfo():
      pass
  
new_contents: #
  #faults are changes in state of code.
  #
  #
  
  
  ## system crtical changes will be added here
  
  class Registor(object):
  
      faultBases = {}
  
      def registerBase(self,faultBase):
          keyName = faultBase.__class__.__name__
          self.faultBases[keyName] = faultBase
          return faultBases[clsName]
  
      def faultFire(self,fault):
          print("Fault fired" + fault.__class__)
  
      def initalizeFaults(faultkeys):
          faultBases = dict.fromkeys(faultkeys,[]) || {'general' : []}
  
  
  class FaultBase(object):
      def __init__(self,registor):
          self.registor = registor
          self.callbacks = {}
  
      def addSubscriber(key,callback):
          if key in faults
              callbacks[key].append(callback)
          else
              callbacks[key] = []
              callbacks[key].append(callback)
      def notify(key,value):
          for callback in callbacks[key]
              callback(value)
              self.registor.faultFire(self)
  
subject: Tidy registor class