Пример #1
0
    def _do_hash(self, func_name, unique_id='', *args, **kwargs):
        if unique_id:
            return unique_id
        else:
            fun_md5 = md5_all(func_name)
            args_md5 = md5_all(args)
            kwargs_md5 = md5_all(kwargs)

        hash_seq = [fun_md5, args_md5, kwargs_md5]
        return md5_encode(';'.join(hash_seq))
Пример #2
0
  def _do_hash(self, func_name, unique_id='', *args, **kwargs):
    if unique_id:
      return unique_id
    else:
      fun_md5 = md5_all(func_name)
      args_md5 = md5_all(args)
      kwargs_md5 = md5_all(kwargs)

    hash_seq = [fun_md5, args_md5, kwargs_md5]
    return md5_encode(';'.join(hash_seq))
Пример #3
0
 def __init__(self, url, check=False, validate_size=0, cache_dir='/tmp/'):
     self.url = url
     self.md5_info = md5_encode(self.url)
     self.check = check
     self.validate_size = validate_size
     self.cache_dir = cache_dir
Пример #4
0
 def __init__(self, url, check=False, validate_size=0, cache_dir='/tmp/'):
   self.url = url
   self.md5_info = md5_encode(self.url)
   self.check = check
   self.validate_size = validate_size
   self.cache_dir = cache_dir