Skip to content

Commit 2016fe9

Browse files
committed
v 1.7.4 fixed issue #46
1 parent 62bf37b commit 2016fe9

File tree

4 files changed

+25
-14
lines changed

4 files changed

+25
-14
lines changed

README.markdown

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,19 @@ Author
272272
Version
273273
=======
274274

275-
* Version: 1.7.3
276-
* Release Date: 2016-06-14
275+
* Version: 1.7.4
276+
* Release Date: 2016-07-08
277277

278278
Revision History
279279
================
280280

281+
Version 1.7.4
282+
-------------
283+
284+
* Release Date: 2016-07-08
285+
* Changes:
286+
* Fixed [bug #46](https://github.com/quandyfactory/dicttoxml/issues/46) on github. Thanks to [robbincatz](https://github.com/robbincatz) for identifying and reporting the issue.
287+
281288
Version 1.7.3
282289
-------------
283290

dicttoxml.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from __future__ import unicode_literals
1313

14-
__version__ = '1.7.3'
14+
__version__ = '1.7.4'
1515
version = __version__
1616

1717
from random import randint
@@ -266,8 +266,8 @@ def convert_list(items, ids, parent, attr_type, item_func, cdata):
266266
this_id = get_unique_id(parent)
267267

268268
for i, item in enumerate(items):
269-
LOG.info('Looping inside convert_list(): item="%s", type="%s"' % (
270-
unicode_me(item), type(item).__name__)
269+
LOG.info('Looping inside convert_list(): item="%s", item_name="%s", type="%s"' % (
270+
unicode_me(item), item_name, type(item).__name__)
271271
)
272272
attr = {} if not ids else { 'id': '%s_%s' % (this_id, i+1) }
273273
if isinstance(item, numbers.Number) or type(item) in (str, unicode):
@@ -281,29 +281,33 @@ def convert_list(items, ids, parent, attr_type, item_func, cdata):
281281

282282
elif isinstance(item, dict):
283283
if not attr_type:
284-
addline('<%s>%s</item>' % (
284+
addline('<%s>%s</%s>' % (
285+
item_name,
286+
convert_dict(item, ids, parent, attr_type, item_func, cdata),
285287
item_name,
286-
convert_dict(item, ids, parent, attr_type, item_func, cdata)
287288
)
288289
)
289290
else:
290-
addline('<%s type="dict">%s</item>' % (
291+
addline('<%s type="dict">%s</%s>' % (
292+
item_name,
293+
convert_dict(item, ids, parent, attr_type, item_func, cdata),
291294
item_name,
292-
convert_dict(item, ids, parent, attr_type, item_func, cdata)
293295
)
294296
)
295297

296298
elif isinstance(item, collections.Iterable):
297299
if not attr_type:
298-
addline('<%s %s>%s</item>' % (
300+
addline('<%s %s>%s</%s>' % (
299301
item_name, make_attrstring(attr),
300-
convert_list(item, ids, 'item', attr_type, item_func, cdata)
302+
convert_list(item, ids, item_name, attr_type, item_func, cdata),
303+
item_name,
301304
)
302305
)
303306
else:
304-
addline('<%s type="list"%s>%s</item>' % (
307+
addline('<%s type="list"%s>%s</%s>' % (
305308
item_name, make_attrstring(attr),
306-
convert_list(item, ids, 'item', attr_type, item_func, cdata)
309+
convert_list(item, ids, item_name, attr_type, item_func, cdata),
310+
item_name,
307311
)
308312
)
309313

dist/dicttoxml-1.7.4.tar.gz

17.8 KB
Binary file not shown.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from distutils.core import setup
22

3-
version = '1.7.3'
3+
version = '1.7.4'
44

55
with open('README.markdown') as readme:
66
long_description = readme.read()

0 commit comments

Comments
 (0)