in libmozdata/hgmozilla.py [0:0]
def get(paths, channel="nightly", node="default"):
"""Get the file info for several paths
Args:
paths (List[str]): the paths
channel (str): channel version of firefox
node (Optional[str]): the node, by default 'default'
Returns:
dict: the files info
"""
data = {}
__base = {"node": node, "file": None}
if isinstance(paths, six.string_types):
__base["file"] = paths
_dict = {}
data[paths] = _dict
FileInfo(
channel=channel,
params=__base,
handler=FileInfo.default_handler,
handlerdata=_dict,
).wait()
else:
url = FileInfo.get_url(channel)
queries = []
for path in paths:
cparams = __base.copy()
cparams["file"] = path
_dict = {}
data[path] = _dict
queries.append(Query(url, cparams, FileInfo.default_handler, _dict))
FileInfo(queries=queries).wait()
return data