'Provides a uniform way of hashing URLs'

def MakeHash(self):

    if (not self.loc):
        return None
    if self.loc.endswith('/'):
        return hashlib.md5(self.loc[:(-1)]).hexdigest()
    return hashlib.md5(self.loc).hexdigest()
