From 0d59c2da97f58a73e1cb6ef1e3e9c3cedf97d805 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 12 Mar 2015 22:56:47 +1100 Subject: [PATCH] Better error when invalid palette is specified --- libmproxy/cmdline.py | 2 +- release/osx-binaries | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py index e45cc54c2..2b8ca7cf4 100644 --- a/libmproxy/cmdline.py +++ b/libmproxy/cmdline.py @@ -571,6 +571,7 @@ def mitmproxy(): parser.add_argument( "--palette", type=str, default="dark", action="store", dest="palette", + choices=sorted(palettes.palettes.keys()), help="Select color palette: " + ", ".join(palettes.palettes.keys()) ) parser.add_argument( @@ -662,4 +663,3 @@ def mitmweb(): help="Intercept filter expression." ) return parser - diff --git a/release/osx-binaries b/release/osx-binaries index c2d9902bd..3cfe0913b 100755 --- a/release/osx-binaries +++ b/release/osx-binaries @@ -56,7 +56,7 @@ $PYINST_CMD ./release/mitmweb.spec echo "Running mitmweb..." ./dist/mitmweb --version || exit 1 -exit DST=osx-mitmproxy-`./dist/mitmdump --shortversion 2>&1` +DST=osx-mitmproxy-`./dist/mitmdump --shortversion 2>&1` mkdir -p $TMPDIR/$DST cp ./dist/mitmproxy $TMPDIR/$DST cp ./dist/mitmdump $TMPDIR/$DST