'Get mime-type and format by file extension.
This only accepts "txt".'

def getTypeByExtension(self, extension):

    if (extension.lower() == 'txt'):
        return ('text/plain', 'TXT')
    elif (extension.lower() == 'png'):
        return ('image/png', 'PNG')
    else:
        raise KnownUnknown(('MirrorOSM    only    makes    .txt    and    .png    tiles,    not    "%s"' % extension))
