Return the name of the server with the notification.

Remove some unnecessary includes.
Fix validation on logging_ignore_interval which wouldn't allow anything less than 30
This commit is contained in:
Tim 2015-07-12 15:32:20 +02:00
commit 0916370a9d
4 changed files with 57 additions and 15 deletions

View file

@ -866,6 +866,34 @@ class PmsConnect(object):
return server_identity
"""
Return a specified server preference.
Parameters required: pref { name of preference }
Output: string
"""
def get_server_pref(self, pref=None):
if pref:
prefs = self.get_server_prefs(output_format='xml')
try:
xml_head = prefs.getElementsByTagName('Setting')
except:
logger.warn("Unable to parse XML for get_local_server_name.")
return ''
pref_value = 'None'
for a in xml_head:
if helpers.get_xml_attr(a, 'id') == pref:
pref_value = helpers.get_xml_attr(a, 'value')
break
return pref_value
else:
logger.debug(u"Server preferences queried but no parameter received.")
return None
"""
Return image data as array.
Array contains the image content type and image binary