From a1ead133df47162d6db42e65e02bce2b7fe44874 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Tue, 22 Jan 2008 20:59:30 +0000 Subject: [PATCH] fix searching for bad url in edit trackers --- deluge/ui/gtkui/edittrackersdialog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deluge/ui/gtkui/edittrackersdialog.py b/deluge/ui/gtkui/edittrackersdialog.py index a6f3689cb..82e7fb6f7 100644 --- a/deluge/ui/gtkui/edittrackersdialog.py +++ b/deluge/ui/gtkui/edittrackersdialog.py @@ -176,8 +176,9 @@ class EditTrackersDialog: def on_button_add_ok_clicked(self, widget): log.debug("on_button_add_ok_clicked") + import re tracker = self.glade.get_widget("entry_tracker").get_text() - if tracker[:7] != "http://" or tracker[:8] != "https://": + if not re.search("https?://", tracker): # Bad url.. lets prepend http:// tracker = "http://" + tracker