X-Git-Url: https://git.phdru.name/?p=extfs.d.git;a=blobdiff_plain;f=xml;fp=xml;h=4822ab8c6005edc39c7995afe1fd856adcc62883;hp=021a9d2e462306fb798e16b1517887237553a08f;hb=3bb64e7b4481efafb1b0ef9d315c52b52a4eddd6;hpb=d3634ec74e393ae21b4fa4e0e10fb3ab567d9e79 diff --git a/xml b/xml index 021a9d2..4822ab8 100755 --- a/xml +++ b/xml @@ -40,7 +40,7 @@ The VFS was inspired by a FUSE xmlfs: https://github.com/halhen/xmlfs """ -__version__ = "1.1.2" +__version__ = "1.1.3" __author__ = "Oleg Broytman " __copyright__ = "Copyright (C) 2013-2015 PhiloSoft Design" __license__ = "GPL" @@ -339,8 +339,10 @@ if use_lxml: def ns2text(self, node): ns_accumulator = [] for name, value in self._get_local_ns(node).items(): - if name is None: name = '' - name = name.encode(default_encoding, "replace") + if name: + name = name.encode(default_encoding, "replace") + else: + name = 'xmlns' value = value.encode(default_encoding, "replace") ns_accumulator.append("%s=%s" % (name, value)) return '\n'.join(ns_accumulator)