diff --git a/scripts/supybot-plugin-doc b/scripts/supybot-plugin-doc index eb2cb4625..e9081757b 100644 --- a/scripts/supybot-plugin-doc +++ b/scripts/supybot-plugin-doc @@ -35,6 +35,7 @@ import os import sys import shutil import string +import logging import supybot @@ -340,6 +341,10 @@ if __name__ == '__main__': genDoc(Plugin, options) if options.clean: + # We are about to remove the log dir; so trying to write anything + # (such as "Shutdown initiated." and friends, from atexit callbacks) + # would result in errors. + log._handler.setLevel(logging.CRITICAL) shutil.rmtree(conf.supybot.directories.log()) shutil.rmtree(conf.supybot.directories.conf()) shutil.rmtree(conf.supybot.directories.data())