aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/pathod_cmdline.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-06-11 16:36:58 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-06-15 15:50:45 +0200
commit22811c45dd1e6e6f1c8108e83a7be625f305c19e (patch)
tree0f8a2374bbf6f56d18d789bd2598168b5b233dca /libpathod/pathod_cmdline.py
parent0bc8fa1d0d4f2730311b9fc934a8fcdaae07ab66 (diff)
downloadmitmproxy-22811c45dd1e6e6f1c8108e83a7be625f305c19e.tar.gz
mitmproxy-22811c45dd1e6e6f1c8108e83a7be625f305c19e.tar.bz2
mitmproxy-22811c45dd1e6e6f1c8108e83a7be625f305c19e.zip
fix craft anchor
The go-button in the app was broken due to an invalid string representation of the regex. A plain string used as URL prefix simplifies this drastically.
Diffstat (limited to 'libpathod/pathod_cmdline.py')
-rw-r--r--libpathod/pathod_cmdline.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/libpathod/pathod_cmdline.py b/libpathod/pathod_cmdline.py
index c1f016c2..68828aca 100644
--- a/libpathod/pathod_cmdline.py
+++ b/libpathod/pathod_cmdline.py
@@ -45,11 +45,11 @@ def args_pathod(argv, stdout=sys.stdout, stderr=sys.stderr):
"""
)
parser.add_argument(
- "-c", dest='craftanchor', default=pathod.DEFAULT_ANCHOR, type=str,
+ "-c", dest='craftanchor', default=pathod.DEFAULT_CRAFT_ANCHOR, type=str,
help="""
- Regular expression specifying anchor point for URL crafting
+ URL path specifying prefix for URL crafting
commands. (%s)
- """%pathod.DEFAULT_ANCHOR
+ """%pathod.DEFAULT_CRAFT_ANCHOR
)
parser.add_argument(
"--confdir",
@@ -203,13 +203,6 @@ def args_pathod(argv, stdout=sys.stdout, stderr=sys.stderr):
return parser.error(v)
args.sizelimit = sizelimit
- try:
- args.craftanchor = re.compile(args.craftanchor)
- except re.error:
- return parser.error(
- "Invalid regex in craft anchor: %s" % args.craftanchor
- )
-
anchors = []
for patt, spec in args.anchors:
if os.path.isfile(spec):