def _strip_uri(repo):
 splits = repo.split()
 for idx in range(len(splits)):
  if any((splits[idx].startswith(x) for x in ('http://', 'https://', 'ftp://'))):
   splits[idx] = splits[idx].rstrip('/')
 return ' '.join(splits)

def _strip_uri ( repo ) : splits = repo . split ( ) for idx in range ( len ( splits ) ) : if any ( ( splits [ idx ] . startswith ( x ) for x in ( 'http://' , 'https://' , 'ftp://' ) ) ) : splits [ idx ] = splits [ idx ] . rstrip ( '/' ) return ' ' . join ( splits )
remove the trailing slash from the uri in a repo definition .