diff options
| -rw-r--r-- | libmproxy/console.py | 13 | 
1 files changed, 8 insertions, 5 deletions
| diff --git a/libmproxy/console.py b/libmproxy/console.py index aca9ecdf..0b44e7af 100644 --- a/libmproxy/console.py +++ b/libmproxy/console.py @@ -266,11 +266,14 @@ class ConnectionView(urwid.WidgetWrap):          else:              c = self.flow.response          path = os.path.expanduser(path) -        f = file(path, "w") -        f.write(str(c.headers)) -        f.write("\r\n") -        f.write(str(c.content)) -        f.close() +        try: +            f = file(path, "w") +            f.write(str(c.headers)) +            f.write("\r\n") +            f.write(str(c.content)) +            f.close() +        except IOError, v: +            self.master.statusbar.message(str(v))      def edit(self, part):          if self.viewing == self.REQ: | 
