Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _read_phonebook(self, url):
"""
Read the content of the phonebook with the given `url`. This
method sets the phone book instance attribute and has no return
value.
"""
root = get_xml_root(url, session=self.fc.session)
self.phonebook = Phonebook()
process_node(self, root)
def _update_calls(self, num=None, days=None):
result = self.fc.call_action(SERVICE, 'GetCallList')
url = result['NewCallListURL']
if days:
url += f'&days={days}'
elif num:
url += f'&max={num}'
root = get_xml_root(url, session=self.fc.session)
self.calls = CallCollection(root)
def add_description(self, source):
"""
Adds description data about the devices and the according
services. 'source' is a string with the xml-data, like the
content of an igddesc- or tr64desc-file.
"""
root = get_xml_root(source, timeout=self.timeout, session=self.session)
self.descriptions.append(Description(root))