Fix cElementTree TypeError: cannot serialize

This commit is contained in:
croneter 2018-10-14 12:14:41 +02:00
parent 36c627651e
commit 76fbf3ac83

View file

@ -931,10 +931,10 @@ def passwords_xml():
if skip_find: if skip_find:
# Server not found, add it. # Server not found, add it.
path = etree.SubElement(root, 'path') path = etree.SubElement(root, 'path')
etree.SubElement(path, 'from', attrib={'pathversion': "1"}).text = \ etree.SubElement(path, 'from', {'pathversion': "1"}).text = \
"smb://%s/" % server "smb://%s/" % server
topath = "smb://%s:%s@%s/" % (user, password, server) topath = "smb://%s:%s@%s/" % (user, password, server)
etree.SubElement(path, 'to', attrib={'pathversion': "1"}).text = topath etree.SubElement(path, 'to', {'pathversion': "1"}).text = topath
# Add credentials # Add credentials
settings('networkCreds', value="%s" % server) settings('networkCreds', value="%s" % server)