Skip to content

Commit

Permalink
cleanup # 489877
Browse files Browse the repository at this point in the history
  • Loading branch information
leifj committed Sep 8, 2014
1 parent 91bca21 commit 9dd7f7c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/pyff/mdx.py
Expand Up @@ -237,7 +237,7 @@ def _links(a):
links.append(dict(rel='disco-json', href='%s/%s.json' % (cherrypy.request.base, a)))

for a in self.server.md.keys():
if not '://' in a:
if '://' not in a:
a = a.lstrip('/')
_links(a)
elif 'http://' in a or 'https://' in a:
Expand Down Expand Up @@ -278,7 +278,6 @@ def __init__(self, server):
memory = dowser.Root()
except ImportError:
memory = NotImplementedFunction('Memory profiling needs dowser')
pass

_well_known = WellKnown()
static = cherrypy.tools.staticdirs.handler("/static", "static")
Expand Down Expand Up @@ -469,7 +468,7 @@ def _d(x, do_split=True):
x = x[8:].decode('base64')

if do_split and '.' in x:
(pth, sep, extn) = x.rpartition('.')
(pth, _, extn) = x.rpartition('.')
if extn in _ctypes:
return pth, extn

Expand Down Expand Up @@ -555,7 +554,7 @@ def _d(x, do_split=True):
url = urlparse.urlparse(referrer)
host = url.netloc
if ':' in url.netloc:
(host, port) = url.netloc.split(':')
(host, _) = url.netloc.split(':')
for host_part in host.rstrip(self.psl.get_public_suffix(host)).split('.'):
if host_part is not None and len(host_part) > 0:
query.append(host_part)
Expand Down Expand Up @@ -696,7 +695,7 @@ def main():
elif o in '--email':
email = a
elif o in ('-A', '--alias'):
(a, sep, uri) = a.lpartition(':')
(a, _, uri) = a.lpartition(':')
if a and uri:
aliases[a] = uri
elif o in '--dir':
Expand Down

0 comments on commit 9dd7f7c

Please sign in to comment.