mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-16 15:39:21 +01:00
parent
63eb6672ea
commit
1f618b9773
@ -234,6 +234,7 @@ if __name__ == '__main__':
|
||||
print('Testing began at %s (pid %s)' % (time.ctime(), os.getpid()))
|
||||
if options.clean:
|
||||
shutil.rmtree(conf.supybot.directories.log())
|
||||
log._mkDirs()
|
||||
shutil.rmtree(conf.supybot.directories.conf())
|
||||
shutil.rmtree(conf.supybot.directories.data())
|
||||
result = runner.run(suite)
|
||||
|
16
src/log.py
16
src/log.py
@ -176,14 +176,18 @@ class ColorizedFormatter(Formatter):
|
||||
else:
|
||||
return Formatter.format(self, record, *args, **kwargs)
|
||||
|
||||
_logDir = conf.supybot.directories.log()
|
||||
if not os.path.exists(_logDir):
|
||||
os.mkdir(_logDir, 0o755)
|
||||
def _mkDirs():
|
||||
global _logDir, pluginLogDir
|
||||
_logDir = conf.supybot.directories.log()
|
||||
if not os.path.exists(_logDir):
|
||||
os.mkdir(_logDir, 0o755)
|
||||
|
||||
pluginLogDir = os.path.join(_logDir, 'plugins')
|
||||
pluginLogDir = os.path.join(_logDir, 'plugins')
|
||||
|
||||
if not os.path.exists(pluginLogDir):
|
||||
os.mkdir(pluginLogDir, 0o755)
|
||||
if not os.path.exists(pluginLogDir):
|
||||
os.mkdir(pluginLogDir, 0o755)
|
||||
|
||||
_mkDirs()
|
||||
|
||||
try:
|
||||
messagesLogFilename = os.path.join(_logDir, 'messages.log')
|
||||
|
Loading…
Reference in New Issue
Block a user