mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-03-17 14:10:07 +01:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
27 lines
780 B
Python
27 lines
780 B
Python
'''
|
|
|
|
:copyright: Copyright 2006-2009 by Oliver Schoenborn, all rights reserved.
|
|
:license: BSD, see LICENSE.txt for details.
|
|
|
|
'''
|
|
|
|
from topicexc import ListenerSpecInvalid
|
|
|
|
|
|
def verifyArgsDifferent(allArgs, allParentArgs, topicName):
|
|
extra = set(allArgs).intersection(allParentArgs)
|
|
if extra:
|
|
msg = 'Args %%s already used in parent of "%s"' % topicName
|
|
raise ListenerSpecInvalid( msg, tuple(extra) )
|
|
|
|
|
|
def verifySubset(all, sub, topicName, extraMsg=''):
|
|
'''Verify that sub is a subset of all for topicName'''
|
|
notInAll = set(sub).difference(all)
|
|
if notInAll:
|
|
args = ','.join(all)
|
|
msg = 'Params [%s] missing inherited [%%s] for topic "%s"%s' % (args, topicName, extraMsg)
|
|
raise ListenerSpecInvalid(msg, tuple(notInAll) )
|
|
|
|
|