def location_to_url(location, strict=True):
 if (location is None):
  return None
 split_path = Hdfs.urlsplit(location)
 if ((strict and (not split_path[1])) or (not split_path[2])):
  return None
 path = location
 if (split_path[0] == 'hdfs'):
  path = split_path[2]
 return reverse('filebrowser.views.view', kwargs=dict(path=path))

def location_to_url ( location , strict = True ) : if ( location is None ) : return None split_path = Hdfs . urlsplit ( location ) if ( ( strict and ( not split_path [ 1 ] ) ) or ( not split_path [ 2 ] ) ) : return None path = location if ( split_path [ 0 ] == 'hdfs' ) : path = split_path [ 2 ] return reverse ( 'filebrowser.views.view' , kwargs = dict ( path = path ) )
if possible .