From 65108ed4290399be7abbc58662cdc6d4f9371142 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 27 Sep 2012 10:56:06 +1200 Subject: Add pathoc -o, oneshot mode, exits after the first non-ignored response. --- libpathod/pathoc.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libpathod') diff --git a/libpathod/pathoc.py b/libpathod/pathoc.py index 0cc0466d..90f3b98b 100644 --- a/libpathod/pathoc.py +++ b/libpathod/pathoc.py @@ -49,6 +49,8 @@ class Pathoc(tcp.TCPClient): explain: Print request explanation hexdump: When printing requests or responses, use hex dump output ignorecodes: Sequence of return codes to ignore + + Returns True if we have a non-ignored response. """ try: r = rparse.parse_request(self.settings, spec) @@ -94,3 +96,4 @@ class Pathoc(tcp.TCPClient): else: if resp: self._show_summary(fp, *resp) + return True -- cgit v1.2.3