fix searching for bad url in edit trackers
This commit is contained in:
parent
22c07f8e10
commit
a1ead133df
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue