Hi, I was trying to populate the two default styles in the database. For this purpose, I was trying to use ConfigurationUpdatedEvent as used in the earlier style manager but I am recieving following error:
Traceback (most recent call last): File "/home/harshit/Drive1/dev/Mailman/mailman/src/mailman/testing/layers.py", line 87, in setUp initialize.initialize_1(INHIBIT_CONFIG_FILE) File "/home/harshit/Drive1/dev/Mailman/mailman/src/mailman/core/initialize.py", line 118, in initialize_1 mailman.config.config.load(config_path) File "/home/harshit/Drive1/dev/Mailman/mailman/src/mailman/config/config.py", line 102, in load self._post_process() File "/home/harshit/Drive1/dev/Mailman/mailman/src/mailman/config/config.py", line 125, in _post_process notify(ConfigurationUpdatedEvent(self)) File "/home/harshit/Drive1/dev/Mailman/env/lib/python3.4/site-packages/zope.event-4.1.0-py3.4.egg/zope/event/__init__.py", line 31, in notify subscriber(event) File "/home/harshit/Drive1/dev/Mailman/mailman/src/mailman/model/styletmanager.py", line 105, in handle_ConfigurationUpdatedEvent getUtility(IStyletManager).populate() File "/home/harshit/Drive1/dev/Mailman/mailman/src/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/home/harshit/Drive1/dev/Mailman/mailman/src/mailman/config/config.py", line 87, in __getattr__ return getattr(self._config, name) File "/home/harshit/Drive1/dev/Mailman/env/lib/python3.4/site-packages/lazr.config-2.1-py3.4.egg/lazr/config/_config.py", line 513, in __getattr__ raise AttributeError("No section or category named %s." % name) AttributeError: No section or category named db.
It seems that the database layer hasn't got initialized by the time this event was fired. Is there any way of fixing this or any other way using which I can populate the database when mailman starts?
Thanks, Harshit Bansal
participants (1)
-
Harshit Bansal