mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Merge pull request #3516 from pierlon/remove-confdir-argument
Remove the confdir argument
This commit is contained in:
commit
2e30c4073d
@ -87,7 +87,7 @@ def run(
|
|||||||
arg_check.check()
|
arg_check.check()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
try:
|
try:
|
||||||
opts.confdir = args.confdir
|
opts.set(*args.setoptions, defer=True)
|
||||||
optmanager.load_paths(
|
optmanager.load_paths(
|
||||||
opts,
|
opts,
|
||||||
os.path.join(opts.confdir, OPTIONS_FILE_NAME),
|
os.path.join(opts.confdir, OPTIONS_FILE_NAME),
|
||||||
@ -110,7 +110,6 @@ def run(
|
|||||||
if args.commands:
|
if args.commands:
|
||||||
master.commands.dump()
|
master.commands.dump()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
opts.set(*args.setoptions, defer=True)
|
|
||||||
if extra:
|
if extra:
|
||||||
opts.update(**extra(args))
|
opts.update(**extra(args))
|
||||||
|
|
||||||
|
@ -20,12 +20,6 @@ def common_options(parser, opts):
|
|||||||
action='store_true',
|
action='store_true',
|
||||||
help="Show all commands and their signatures",
|
help="Show all commands and their signatures",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
|
||||||
"--confdir",
|
|
||||||
type=str, dest="confdir", default=core.CONF_DIR,
|
|
||||||
metavar="PATH",
|
|
||||||
help="Path to the mitmproxy config directory"
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--set",
|
"--set",
|
||||||
type=str, dest="setoptions", default=[],
|
type=str, dest="setoptions", default=[],
|
||||||
|
Loading…
Reference in New Issue
Block a user