minor cleanups

This commit is contained in:
Maximilian Hils 2016-09-24 16:34:20 -07:00
parent 20bcfbb5d0
commit 92dd030c22
2 changed files with 4 additions and 4 deletions

View File

@ -536,11 +536,11 @@ def main(args): # pragma: no cover
if ret and args.oneshot:
return
# We consume the queue when we can, so it doesn't build up.
for i_ in p.wait(timeout=0, finish=False):
for _ in p.wait(timeout=0, finish=False):
pass
except exceptions.NetlibException:
break
for i_ in p.wait(timeout=0.01, finish=True):
for _ in p.wait(timeout=0.01, finish=True):
pass
except exceptions.TcpException as v:
print(str(v), file=sys.stderr)

View File

@ -210,8 +210,8 @@ def args_pathoc(argv, stdout=sys.stdout, stderr=sys.stderr):
reqs = []
for r in args.requests:
if os.path.isfile(r):
data = open(r).read()
r = data
with open(r) as f:
r = f.read()
try:
reqs.append(language.parse_pathoc(r, args.use_http2))
except language.ParseException as v: