def _unify_sources_and_hashes(source=None, source_hash=None, sources=None, source_hashes=None):
 if (sources is None):
  sources = []
 if (source_hashes is None):
  source_hashes = []
 if (source and sources):
  return (False, 'source and sources are mutually exclusive', [])
 if (source_hash and source_hashes):
  return (False, 'source_hash and source_hashes are mutually exclusive', [])
 if source:
  return (True, '', [(source, source_hash)])
 return (True, '', list(zip_longest(sources, source_hashes[:len(sources)])))

def _unify_sources_and_hashes ( source = None , source_hash = None , sources = None , source_hashes = None ) : if ( sources is None ) : sources = [ ] if ( source_hashes is None ) : source_hashes = [ ] if ( source and sources ) : return ( False , 'source and sources are mutually exclusive' , [ ] ) if ( source_hash and source_hashes ) : return ( False , 'source_hash and source_hashes are mutually exclusive' , [ ] ) if source : return ( True , '' , [ ( source , source_hash ) ] ) return ( True , '' , list ( zip_longest ( sources , source_hashes [ : len ( sources ) ] ) ) )
silly little function to give us a standard tuple list for sources and source_hashes .