Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky committed Oct 3, 2015
1 parent 71f556b commit 57d7b82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 4 additions & 2 deletions djangocms_link/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ class IntranetURLValidator(URLValidator):
def __init__(self, intranet_host_re=None, **kwargs):
super(IntranetURLValidator, self).__init__(**kwargs)
if intranet_host_re:
self.host_re = ('(' + self.hostname_re + self.domain_re +
self.tld_re + '|' + intranet_host_re + '|localhost)')
self.host_re = (
'(' + self.hostname_re + self.domain_re + self.tld_re +
'|' + intranet_host_re + '|localhost)'
)
self.regex = re.compile(
r'^(?:[a-z0-9\.\-]*)://'
r'(?:\S+(?::\S*)?@)?'
Expand Down
4 changes: 0 additions & 4 deletions test_settings.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# -*- coding: utf-8 -*-
from distutils.version import LooseVersion
import sys
from tempfile import mkdtemp
import django

gettext = lambda s: s

Expand Down Expand Up @@ -51,4 +48,3 @@ def run():

if __name__ == '__main__':
run()

0 comments on commit 57d7b82

Please sign in to comment.