fix searching for bad url in edit trackers

This commit is contained in:
Marcos Pinto 2008-01-22 20:59:30 +00:00
parent 22c07f8e10
commit a1ead133df
1 changed files with 2 additions and 1 deletions

View File

@ -176,8 +176,9 @@ class EditTrackersDialog:
def on_button_add_ok_clicked(self, widget): def on_button_add_ok_clicked(self, widget):
log.debug("on_button_add_ok_clicked") log.debug("on_button_add_ok_clicked")
import re
tracker = self.glade.get_widget("entry_tracker").get_text() 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:// # Bad url.. lets prepend http://
tracker = "http://" + tracker tracker = "http://" + tracker