Skip to content

Commit

Permalink
One common --version flag
Browse files Browse the repository at this point in the history
  • Loading branch information
cortesi committed Nov 15, 2014
1 parent 23a4f15 commit aa77a52
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions libmproxy/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ def get_common_options(options):


def common_options(parser):
parser.add_argument(
'--version',
action= 'version',
version= "%(prog)s" + " " + version.VERSION
)
parser.add_argument(
"--anticache",
action="store_true", dest="anticache", default=False,
Expand Down Expand Up @@ -530,11 +535,6 @@ def mitmproxy():
add_config_file_help = True,
add_env_var_help = True
)
parser.add_argument(
'--version',
action='version',
version=version.NAMEVERSION
)
common_options(parser)
parser.add_argument(
"--palette", type=str, default="dark",
Expand Down Expand Up @@ -570,11 +570,6 @@ def mitmdump():
add_env_var_help = True
)

parser.add_argument(
'--version',
action= 'version',
version= "mitmdump" + " " + version.VERSION
)
common_options(parser)
parser.add_argument(
"--keepserving",
Expand Down Expand Up @@ -604,11 +599,6 @@ def mitmweb():
add_config_file_help = True,
add_env_var_help = True
)
parser.add_argument(
'--version',
action='version',
version="mitmweb" + " " + version.VERSION
)

group = parser.add_argument_group("Mitmweb")
group.add_argument(
Expand Down

0 comments on commit aa77a52

Please sign in to comment.