@staticmethod
def _parse_head(text, warn):
    """
        Scan header lines and extract key/value pairs. A pair contains a colon
        but value can be more key/value pairs containing an equals sign, separated by semi-colons
        """
    dlsmeta = []
    othermeta = []
    for l in text:
        r = l.split(':')
        if len(r) == 1:
            othermeta.append(r)
        else:
            if len(r) > 2 and warn:
                print('Line has more than one colon:', l)
            dlsmeta.append((r[0], l[len(r[0]) + 1:].strip()))
    return dlsmeta
