comparison src/plugins/plugin_xep_0050.py @ 1495:987e74cbb839

plugin XEP-0050: fixed crash on empty node in addAdHocCommand
author Goffi <goffi@goffi.org>
date Tue, 25 Aug 2015 20:20:47 +0200
parents 74ddb4cc2ff9
children 5ddc4cf251fa
comparison
equal deleted inserted replaced
1494:74ddb4cc2ff9 1495:987e74cbb839
481 @param profile_key: profile key associated with this command, @ALL@ means can be accessed with every profiles 481 @param profile_key: profile key associated with this command, @ALL@ means can be accessed with every profiles
482 @return: node of the added command, useful to remove the command later 482 @return: node of the added command, useful to remove the command later
483 """ 483 """
484 # FIXME: "@ALL@" for profile_key seems useless and dangerous 484 # FIXME: "@ALL@" for profile_key seems useless and dangerous
485 485
486 node = node.strip() 486 if node is None:
487 if not node:
488 node = "%s_%s" % ('COMMANDS', uuid4()) 487 node = "%s_%s" % ('COMMANDS', uuid4())
489 488
490 if features is None: 489 if features is None:
491 features = [data_form.NS_X_DATA] 490 features = [data_form.NS_X_DATA]
492 491