diff --git a/libmproxy/dump.py b/libmproxy/dump.py index 6f544d6af..67f39a063 100644 --- a/libmproxy/dump.py +++ b/libmproxy/dump.py @@ -85,15 +85,6 @@ class DumpMaster(flow.FlowMaster): not options.keepserving ) - if options.rfile: - path = os.path.expanduser(options.rfile) - try: - f = file(path, "r") - freader = flow.FlowReader(f) - except IOError, v: - raise DumpError(v.strerror) - self.load_flows(freader) - if options.client_replay: self.start_client_playback( self._readflow(options.client_replay), @@ -105,6 +96,16 @@ class DumpMaster(flow.FlowMaster): if err: raise DumpError(err) + if options.rfile: + path = os.path.expanduser(options.rfile) + try: + f = file(path, "r") + freader = flow.FlowReader(f) + except IOError, v: + raise DumpError(v.strerror) + self.load_flows(freader) + + def _readflow(self, path): path = os.path.expanduser(path) try: