Commit 0dc661b5 authored by Philipp Hörist's avatar Philipp Hörist

DiscoInfo: Add has_category() method

parent 0783d913
Pipeline #5389 failed with stages
in 24 seconds
......@@ -372,6 +372,12 @@ class DiscoInfo(namedtuple('DiscoInfo', 'stanza identities features dataforms ti
return identity.type
return None
def has_category(self, category):
for identity in self.identities:
if identity.category == category:
return True
return False
@property
def httpupload_max_file_size(self):
size = self.get_field_value(NS_HTTPUPLOAD_0, 'max-file-size')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment