Pop off the version when aggregating pkg states

This squelches a spurious warning that we get due to rewriting the low
data such that the name and version are aggregated under the "pkgs" arg,
with the "version" key remaining in the low chunk.
This commit is contained in:
Erik Johnson 2017-03-23 11:56:28 -05:00
parent 0055fda3e9
commit 1a731e0216

View file

@ -2431,8 +2431,9 @@ def mod_aggregate(low, chunks, running):
pkgs.extend(chunk['pkgs'])
chunk['__agg__'] = True
elif 'name' in chunk:
if 'version' in chunk:
pkgs.append({chunk['name']: chunk['version']})
version = chunk.pop('version', None)
if version is not None:
pkgs.append({chunk['name']: version})
else:
pkgs.append(chunk['name'])
chunk['__agg__'] = True