def _merge_hash(option, opt_str, value, parser):
 if (not parser.values.hashes):
  parser.values.hashes = {}
 try:
  (algo, digest) = value.split(':', 1)
 except ValueError:
  parser.error(('Arguments to %s must be a hash name followed by a value, like --hash=sha256:abcde...' % opt_str))
 if (algo not in STRONG_HASHES):
  parser.error(('Allowed hash algorithms for %s are %s.' % (opt_str, ', '.join(STRONG_HASHES))))
 parser.values.hashes.setdefault(algo, []).append(digest)

def _merge_hash ( option , opt_str , value , parser ) : if ( not parser . values . hashes ) : parser . values . hashes = { } try : ( algo , digest ) = value . split ( ':' , 1 ) except ValueError : parser . error ( ( 'Arguments to %s must be a hash name followed by a value, like --hash=sha256:abcde...' % opt_str ) ) if ( algo not in STRONG_HASHES ) : parser . error ( ( 'Allowed hash algorithms for %s are %s.' % ( opt_str , ', ' . join ( STRONG_HASHES ) ) ) ) parser . values . hashes . setdefault ( algo , [ ] ) . append ( digest )
given a value spelled "algo:digest" .