comparison idavoll/pubsub.py @ 141:d2c18d88f618

Don't break on non-element childs.
author Ralph Meijer <ralphm@ik.nu>
date Tue, 14 Jun 2005 12:12:23 +0000
parents 46453af6b0c3
children fee92e499d6d
comparison
equal deleted inserted replaced
140:d79f0816f6c3 141:d2c18d88f618
491 max_items = int(max_items) 491 max_items = int(max_items)
492 except ValueError: 492 except ValueError:
493 raise BadRequest 493 raise BadRequest
494 494
495 item_ids = [] 495 item_ids = []
496 for child in iq.pubsub.items.children: 496 for child in iq.pubsub.items.elements():
497 if child.name == 'item' and child.uri == NS_PUBSUB: 497 if child.name == 'item' and child.uri == NS_PUBSUB:
498 try: 498 try:
499 item_ids.append(child["id"]) 499 item_ids.append(child["id"])
500 except KeyError: 500 except KeyError:
501 raise BadRequest 501 raise BadRequest