mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
remove code duplication
This commit is contained in:
parent
493302d180
commit
aea3837d4a
@ -85,12 +85,12 @@ class DumpMaster(flow.FlowMaster):
|
|||||||
self.set_stickyauth(options.stickyauth)
|
self.set_stickyauth(options.stickyauth)
|
||||||
|
|
||||||
if options.outfile:
|
if options.outfile:
|
||||||
path = os.path.expanduser(options.outfile[0])
|
err = self.start_stream_to_path(
|
||||||
try:
|
options.outfile[0],
|
||||||
f = open(path, options.outfile[1])
|
options.outfile[1]
|
||||||
self.start_stream(f, self.filt)
|
)
|
||||||
except IOError as v:
|
if err:
|
||||||
raise DumpError(v.strerror)
|
raise DumpError(err)
|
||||||
|
|
||||||
if options.replacements:
|
if options.replacements:
|
||||||
for i in options.replacements:
|
for i in options.replacements:
|
||||||
|
Loading…
Reference in New Issue
Block a user