()
Initializes dictionary containing common output values used by "good samaritan" feature
Initializes dictionary containing common output values used by "good samaritan" feature
Initializes dictionary containing common output values used by good samaritan feature
def initCommonOutputs():
    """
    Initializes dictionary containing common output values used by "good samaritan" feature
    """

    kb.commonOutputs = {}
    key = None

    with openFile(paths.COMMON_OUTPUTS, 'r') as f:
        for line in f.readlines():  # xreadlines doesn't return unicode strings when codec.open() is used
            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 ( ) : # xreadlines doesn't return unicode strings when codec.open() is used 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 )