summaryrefslogtreecommitdiff
path: root/registry.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2012-09-20 10:03:55 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2012-09-20 10:03:55 +0200
commit6c87841bc7f0a1224df6708e88e376af29c4f535 (patch)
treef0c808f16b6db8801c7a718b50dd9db0ce1a76f0 /registry.py
parente4009dd450ea20f87fbb5b7349343c324b96a920 (diff)
downloadlogilab-common-6c87841bc7f0a1224df6708e88e376af29c4f535.tar.gz
[registry] add assertion useful if e.g. arguments are inversed by inadvertance
Diffstat (limited to 'registry.py')
-rw-r--r--registry.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/registry.py b/registry.py
index 29f3c56..cebed8e 100644
--- a/registry.py
+++ b/registry.py
@@ -519,6 +519,8 @@ class RegistryStore(dict):
:meth:`~logilab.common.registry.RegistryStore.register_and_replace`
for instance)
"""
+ assert isinstance(modname, basestring), \
+ 'modname expected to be a module name (ie string), got %r' % modname
for obj in objects:
try:
if obj.__module__ != modname or obj in butclasses: