fix the build

Summary: Reports of my competence were greatly overstated.

Reviewed By: quark-zju

Differential Revision: D8174059

fbshipit-source-id: 25de102f9fa7b47f9654ae0219e5373e9111b197
This commit is contained in:
Phil Cohen 2018-05-25 18:02:47 -07:00 committed by Facebook Github Bot
parent 490247285c
commit 41453a9a02

View File

@ -84,8 +84,9 @@ Test topdir logging:
$ setconfig sampling.logtopdir=True
$ setconfig sampling.key.command_info=command_info
$ hg st > /dev/null
hiatexit handler executed
atexit handler executed
>>> import json
>>> with open("$LOGDIR/samplingpath.txt") as f:
... data = f.read().strip("\0").split("\0")
>>> print([d for d in data if "topdir" in d])
['{"category": "command_info", "data": {"topdir": "a_topdir", "metrics_type": "command_info"}}']
>>> print([json.loads(d)["data"]["topdir"] for d in data if "topdir" in d])
[u'a_topdir']