Skip to content

Commit

Permalink
measure-payloads.py: minor formatting tweaks
Browse files Browse the repository at this point in the history
Just some helpful info / better variable names for when you're using
this with `ipython3 -i measure-payloads.py ...`
  • Loading branch information
wgwoods committed Aug 7, 2019
1 parent 8cacdb5 commit 4f459f8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions measure-payloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ def dump_payloaddata(repo_paths, outfile="payloaddata.json.gz"):
json.dump(o, outf)
return uids, gids, rpms


class RPMCountLoader(object):
'''An object for doing progress reporting while loading payloaddata'''
def __init__(self, total, prefix=''):
Expand Down Expand Up @@ -202,5 +201,10 @@ def load_payloaddata(datafile):
print("Data loaded:")
for f in pd:
print(f" uids, gids, rpms = pd[{f!r}]")
print("rpms is a dict of {nevra:[[file1,hardlink1,...],\n"
" [file2],\n"
" [file3],...],...}\n")
elif sys.argv[1] == "generate":
uids, gids, files = dump_payloaddata(sys.argv[3:], sys.argv[2])
outfn = sys.argv[2]
repodirs = sys.argv[3:]
uids, gids, files = dump_payloaddata(repodirs, outfn)

0 comments on commit 4f459f8

Please sign in to comment.