diff --git a/libpathod/pathod_cmdline.py b/libpathod/pathod_cmdline.py index 68828aca9..f1bb6982a 100644 --- a/libpathod/pathod_cmdline.py +++ b/libpathod/pathod_cmdline.py @@ -208,17 +208,11 @@ def args_pathod(argv, stdout=sys.stdout, stderr=sys.stderr): if os.path.isfile(spec): data = open(spec).read() spec = data - try: - req = language.parse_pathod(spec) - except language.ParseException as v: - print >> stderr, "Error parsing anchor spec: %s" % v.msg - print >> stderr, v.marked() - sys.exit(1) try: arex = re.compile(patt) except re.error: return parser.error("Invalid regex in anchor: %s" % patt) - anchors.append((arex, req)) + anchors.append((arex, spec)) args.anchors = anchors return args diff --git a/test/test_pathoc.py b/test/test_pathoc.py index 28514378b..e1e1fe97b 100644 --- a/test/test_pathoc.py +++ b/test/test_pathoc.py @@ -23,7 +23,7 @@ class _TestDaemon: ssloptions = self.ssloptions, staticdir = tutils.test_data.path("data"), anchors = [ - (re.compile("/anchor/.*"), language.parse_pathod("202")) + (re.compile("/anchor/.*"), "202") ] ) diff --git a/test/test_pathod_cmdline.py b/test/test_pathod_cmdline.py index 590bb56bc..829c4b32e 100644 --- a/test/test_pathod_cmdline.py +++ b/test/test_pathod_cmdline.py @@ -65,15 +65,6 @@ def test_pathod(perror): assert perror.called perror.reset_mock() - s = cStringIO.StringIO() - tutils.raises( - SystemExit, - cmdline.args_pathod, - ["pathod", "-a", "foo=."], - s, - s - ) - a = cmdline.args_pathod( [ "pathod", @@ -92,13 +83,3 @@ def test_pathod(perror): ) assert perror.called perror.reset_mock() - - a = cmdline.args_pathod( - [ - "pathod", - "-c", - "?" - ] - ) - assert perror.called - perror.reset_mock() diff --git a/test/tutils.py b/test/tutils.py index c56c60d43..60c0765a5 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -27,7 +27,7 @@ class DaemonTests(object): klass.d = test.Daemon( staticdir=test_data.path("data"), anchors=[ - (re.compile("/anchor/.*"), language.parse_pathod("202:da")) + (re.compile("/anchor/.*"), "202:da") ], ssl = klass.ssl, ssloptions = so,