comparison sat/plugins/plugin_comp_file_sharing.py @ 3859:3ef988734869

core: fix calls to `domish.Element.elements`: domish.Element.elements should be called with namespace and element name as 2 arguments, but it has been confused in several places with the call to `domish.Element.addElement` which is often done with a `(namespace, name)` tuple. Unfortunately calling with a tuple is accepted and doesn't raise any error in `elements`, but this result in a wrong element returned. This patch fixes the erroneous calls.
author Goffi <goffi@goffi.org>
date Wed, 20 Jul 2022 17:12:29 +0200
parents 7b90d7c474fa
children 7af29260ecb8
comparison
equal deleted inserted replaced
3858:6e785662dd7d 3859:3ef988734869
729 ) 729 )
730 730
731 def _getDirectoryMetadataElts( 731 def _getDirectoryMetadataElts(
732 self, client, elt, file_data): 732 self, client, elt, file_data):
733 try: 733 try:
734 affiliation_elt = next(elt.elements((NS_FS_AFFILIATION, "affiliation"))) 734 affiliation_elt = next(elt.elements(NS_FS_AFFILIATION, "affiliation"))
735 except StopIteration: 735 except StopIteration:
736 pass 736 pass
737 else: 737 else:
738 file_data['affiliation'] = str(affiliation_elt) 738 file_data['affiliation'] = str(affiliation_elt)
739 739