# HG changeset patch # User Goffi # Date 1600371623 -7200 # Node ID 43e60c40de651f0db3317a280776bc31130035a7 # Parent 57afccb91961fb25812ef756fc6ed8a14e53482a core (memory/memory): fixed directory creation in setFile diff -r 57afccb91961 -r 43e60c40de65 sat/memory/memory.py --- a/sat/memory/memory.py Thu Sep 17 19:01:02 2020 +0200 +++ b/sat/memory/memory.py Thu Sep 17 21:40:23 2020 +0200 @@ -1568,6 +1568,7 @@ @param path(unicode, None): virtual path of the file in the namespace if set, parent must be None. All intermediate directories will be created if needed, using current access. + @param type_(str, None): type of file filter, can be one of C.FILE_TYPE_* @param file_hash(unicode): unique hash of the payload @param hash_algo(unicode): algorithm used for hashing the file (usually sha-256) @param size(int): size in bytes @@ -1623,7 +1624,7 @@ if namespace is not None: namespace = namespace.strip() or None if type_ == C.FILE_TYPE_DIRECTORY: - if any(version, file_hash, size, mime_type): + if any((version, file_hash, size, mime_type)): raise ValueError( "version, file_hash, size and mime_type can't be set for a directory" )