aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/console/flowlist.py
diff options
context:
space:
mode:
authorMarcelo Glezer <marcelo.glezer@gmail.com>2015-02-12 01:33:35 -0300
committerMarcelo Glezer <marcelo.glezer@gmail.com>2015-02-12 01:33:35 -0300
commit58091b704111b3192693f1af763888c50c68a481 (patch)
tree4c38876709a71cbbeebb9564f17b595c869ae125 /libmproxy/console/flowlist.py
parent16653cc62be4109cd465594ca2f5226d954027f2 (diff)
downloadmitmproxy-58091b704111b3192693f1af763888c50c68a481.tar.gz
mitmproxy-58091b704111b3192693f1af763888c50c68a481.tar.bz2
mitmproxy-58091b704111b3192693f1af763888c50c68a481.zip
removed useless try except
Diffstat (limited to 'libmproxy/console/flowlist.py')
-rw-r--r--libmproxy/console/flowlist.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/libmproxy/console/flowlist.py b/libmproxy/console/flowlist.py
index cd866819..9e7c6d69 100644
--- a/libmproxy/console/flowlist.py
+++ b/libmproxy/console/flowlist.py
@@ -265,12 +265,13 @@ class FlowListBox(urwid.ListBox):
self.master.prompt("URL:", "http://www.example.com/", self.new_request, method)
def new_request(self, url, method):
- try:
- scheme, host, port, path = http.parse_url(str(url))
- f = self.master.create_request(method, scheme, host, port, path)
- self.master.view_flow(f)
- except ValueError:
+ parts = http.parse_url(str(url))
+ if not parts:
self.master.statusbar.message("Invalid Url")
+ return
+ scheme, host, port, path = parts
+ f = self.master.create_request(method, scheme, host, port, path)
+ self.master.view_flow(f)
def keypress(self, size, key):
key = common.shortcuts(key)