diff options
-rw-r--r-- | doc-src/scripting/inlinescripts.html | 4 | ||||
-rw-r--r-- | libmproxy/console/__init__.py | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/doc-src/scripting/inlinescripts.html b/doc-src/scripting/inlinescripts.html index 2c3e0d6f..7f05eedf 100644 --- a/doc-src/scripting/inlinescripts.html +++ b/doc-src/scripting/inlinescripts.html @@ -130,7 +130,7 @@ The main classes you will deal with in writing mitmproxy scripts are: </td> </tr> <tr> - <th>libmproxy.certutils.SSLCert</th> + <th>netlib.certutils.SSLCert</th> <td>Exposes information SSL certificates.</td> </tr> </table> @@ -174,4 +174,4 @@ matching events will be skipped. ## Spaces in the script path By default, spaces are interpreted as separator between the inline script and its arguments (e.g. <code>-s "foo.py 42"</code>). Consequently, the script path needs to be wrapped in a separate pair of quotes if it contains spaces: -<code>-s "'./foo bar/baz.py' 42"</code>.
\ No newline at end of file +<code>-s "'./foo bar/baz.py' 42"</code>. diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py index a8c728a9..7e770723 100644 --- a/libmproxy/console/__init__.py +++ b/libmproxy/console/__init__.py @@ -508,14 +508,22 @@ class ConsoleMaster(flow.FlowMaster): def client_playback_path(self, path): err, ret = self._readflow(path) if err: - self.statusbar.message(ret) + if not self.statusbar: + print >> sys.stderr, ret + sys.exit(1) + else: + self.statusbar.message(ret) else: self.start_client_playback(ret, False) def server_playback_path(self, path): err, ret = self._readflow(path) if err: - self.statusbar.message(ret) + if not self.statusbar: + print >> sys.stderr, ret + sys.exit(1) + else: + self.statusbar.message(ret) else: self.start_server_playback( ret, |