mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
minor cleanups
This commit is contained in:
parent
20bcfbb5d0
commit
92dd030c22
@ -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)
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user