fixed issue with loading custom service directories from xml, fixed issue with parsing an empty tuple string in utility method
This commit is contained in:
parent
cf6f8391b0
commit
ae2c0aa697
2 changed files with 6 additions and 2 deletions
|
@ -132,7 +132,11 @@ def make_tuple_fromstr(s, value_type):
|
|||
:rtype: tuple
|
||||
"""
|
||||
# remove tuple braces and strip commands and space from all values in the tuple string
|
||||
values = [x.strip("' ") for x in s.strip("(), ").split(",")]
|
||||
values = []
|
||||
for x in s.strip("(), ").split(","):
|
||||
x = x.strip("' ")
|
||||
if x:
|
||||
values.append(x)
|
||||
return tuple(value_type(i) for i in values)
|
||||
|
||||
|
||||
|
|
|
@ -764,7 +764,7 @@ class CoreXmlReader(object):
|
|||
|
||||
directory_elements = service_configuration.find("directories")
|
||||
if directory_elements is not None:
|
||||
service.directories = tuple(x.text for x in directory_elements.iterchildren())
|
||||
service.dirs = tuple(x.text for x in directory_elements.iterchildren())
|
||||
|
||||
startup_elements = service_configuration.find("startups")
|
||||
if startup_elements is not None:
|
||||
|
|
Loading…
Reference in a new issue