Mercurial > libervia-backend
comparison src/memory/params.py @ 1496:de71cd99ba9b
core (params): fixed exception on empty jids list
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 25 Aug 2015 20:20:53 +0200 |
parents | 8d61160ee4b8 |
children | 7a9cef71ae43 |
comparison
equal
deleted
inserted
replaced
1495:987e74cbb839 | 1496:de71cd99ba9b |
---|---|
371 log.error(_(u'Parameter (%(cat)s, %(param)s) of type list has no default option!') % {'cat': cat, 'param': param}) | 371 log.error(_(u'Parameter (%(cat)s, %(param)s) of type list has no default option!') % {'cat': cat, 'param': param}) |
372 else: | 372 else: |
373 log.error(_(u'Parameter (%(cat)s, %(param)s) of type list has more than one default option!') % {'cat': cat, 'param': param}) | 373 log.error(_(u'Parameter (%(cat)s, %(param)s) of type list has more than one default option!') % {'cat': cat, 'param': param}) |
374 raise exceptions.DataError | 374 raise exceptions.DataError |
375 elif node.getAttribute('type') == 'jids_list': | 375 elif node.getAttribute('type') == 'jids_list': |
376 if not value: | |
377 log.debug(u"jids list value is empty") | |
378 return [] | |
376 jids = value.split('\t') | 379 jids = value.split('\t') |
377 to_delete = [] | 380 to_delete = [] |
378 for idx, value in enumerate(jids): | 381 for idx, value in enumerate(jids): |
379 try: | 382 try: |
380 jids[idx] = jid.JID(value) | 383 jids[idx] = jid.JID(value) |