def lint(filename):
    """Lints an INI file, returning 0 in case of success."""
    config = ConfigParser.ConfigParser()
    try:
        config.read(filename)
        return 0
    except ConfigParser.Error as error:
        print('Error: %s' % error)
        return 1
    except:
        print('Unexpected Error')
        return 2
Lints an INI file, returning 0 in case of success.