Commit 07a9c8c8 by aa.gusti

perbaikan get_urls

1 parent df92e247
......@@ -2,10 +2,10 @@ import locale
import logging
import re
# from opensipkd.tools.captcha import get_captcha_url
from .routes import routes
# from opensipkd.tools.captcha import get_captcha_url
try:
from urllib import (urlencode, quote, quote_plus, )
except ImportError:
......@@ -417,8 +417,11 @@ def get_urls(url):
if home:
urls = url.split(":")
homes = home.split(":")
if urls[0] != homes[0]:
return ":".join([homes[0], ":".join(urls[1:])])
if len(urls) > 0:
if urls[0] != homes[0]:
return ":".join([homes[0], ":".join(urls[1:])])
else:
return home + url
return url
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!