Exemple #1
0
def _load_bundles(fp):
    """Read an asset bundle config from a file object."""
    parser = configparser.ConfigParser()

    # readfp() changed to read_file() in Python 3.2.
    # FIXME: Remove this once we no longer support Python 2.
    if sys.version_info.major == 3 and sys.version_info.minor >= 2:
        parser.read_file(fp)
    else:
        parser.readfp(fp)

    return {k: aslist(v) for k, v in parser.items('bundles')}
Exemple #2
0
def _load_bundles(fp):
    """Read an asset bundle config from a file object."""
    parser = configparser.ConfigParser()
    parser.readfp(fp)
    return {k: aslist(v) for k, v in parser.items('bundles')}