Skip to content

Commit

Permalink
Turn dict from serialized Counter back into a Counter.
Browse files Browse the repository at this point in the history
  • Loading branch information
annawoodard committed May 13, 2016
1 parent 2a297e7 commit d41ef4d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lobster/core/data/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,13 @@ def get_bare_size(filename):
with open('report.json', 'r') as f:
data = json.load(f)

# Dumping `data` turns the defaultdict of Counters into a dict of
# dicts, so copy it back into a defaultdict of Counters
transfers = defaultdict(Counter)
for protocol in data['transfers']:
transfers[protocol].update(data['transfers'][protocol])
data['transfers'] = transfers

data['task timing']['epilogue end'] = int(datetime.now().strftime('%s'))

stageout_se = target_se
Expand Down

0 comments on commit d41ef4d

Please sign in to comment.