def initCommonOutputs():
 kb.commonOutputs = {}
 key = None
 with openFile(paths.COMMON_OUTPUTS, 'r') as f:
  for line in f.readlines():
   if (line.find('#') != (-1)):
    line = line[:line.find('#')]
   line = line.strip()
   if (len(line) > 1):
    if (line.startswith('[') and line.endswith(']')):
     key = line[1:(-1)]
    elif key:
     if (key not in kb.commonOutputs):
      kb.commonOutputs[key] = set()
     if (line not in kb.commonOutputs[key]):
      kb.commonOutputs[key].add(line)

def initCommonOutputs ( ) : kb . commonOutputs = { } key = None with openFile ( paths . COMMON_OUTPUTS , 'r' ) as f : for line in f . readlines ( ) : if ( line . find ( '#' ) != ( - 1 ) ) : line = line [ : line . find ( '#' ) ] line = line . strip ( ) if ( len ( line ) > 1 ) : if ( line . startswith ( '[' ) and line . endswith ( ']' ) ) : key = line [ 1 : ( - 1 ) ] elif key : if ( key not in kb . commonOutputs ) : kb . commonOutputs [ key ] = set ( ) if ( line not in kb . commonOutputs [ key ] ) : kb . commonOutputs [ key ] . add ( line )
initializes dictionary containing common output values used by "good samaritan" feature .