mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-10-17 09:27:23 +02:00
Prevent scheduled downloads from happening when we're generating
docs (hopfully), and fix a userdataFilename bug introduced in the earlier fix.
This commit is contained in:
parent
9d9c3020ca
commit
1383da0f1a
@ -238,7 +238,8 @@ if __name__ == '__main__':
|
|||||||
if not os.path.exists(conf.supybot.directories.data()):
|
if not os.path.exists(conf.supybot.directories.data()):
|
||||||
os.mkdir(conf.supybot.directories.data())
|
os.mkdir(conf.supybot.directories.data())
|
||||||
|
|
||||||
userdataFilename = os.path.join(supybot.directories.conf(),'userdata.conf')
|
userdataFilename = os.path.join(conf.supybot.directories.conf(),
|
||||||
|
'userdata.conf')
|
||||||
# Let's open this now since we've got our directories setup.
|
# Let's open this now since we've got our directories setup.
|
||||||
if not os.path.exists(userdataFilename):
|
if not os.path.exists(userdataFilename):
|
||||||
fd = file(userdataFilename, 'w')
|
fd = file(userdataFilename, 'w')
|
||||||
|
@ -293,6 +293,8 @@ class PeriodicFileDownloader(object):
|
|||||||
self.getFile(filename)
|
self.getFile(filename)
|
||||||
|
|
||||||
def _downloadFile(self, filename, url, f):
|
def _downloadFile(self, filename, url, f):
|
||||||
|
if world.documenting:
|
||||||
|
return
|
||||||
self.currentlyDownloading.add(filename)
|
self.currentlyDownloading.add(filename)
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
|
@ -66,7 +66,9 @@ commandsProcessed = 0
|
|||||||
ircs = [] # A list of all the IRCs.
|
ircs = [] # A list of all the IRCs.
|
||||||
|
|
||||||
def _flushUserData():
|
def _flushUserData():
|
||||||
registry.close(conf.users, conf.userdataFilename, annotated=False)
|
userdataFilename = os.path.join(conf.supybot.directories.conf(),
|
||||||
|
'userdata.conf')
|
||||||
|
registry.close(conf.users, userdataFilename, annotated=False)
|
||||||
|
|
||||||
flushers = [_flushUserData] # A periodic function will flush all these.
|
flushers = [_flushUserData] # A periodic function will flush all these.
|
||||||
|
|
||||||
@ -174,6 +176,7 @@ atexit.register(startDying)
|
|||||||
##################################################
|
##################################################
|
||||||
testing = False
|
testing = False
|
||||||
dying = False
|
dying = False
|
||||||
|
documenting = False
|
||||||
|
|
||||||
|
|
||||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
@ -38,10 +38,13 @@ import textwrap
|
|||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
import supybot
|
import supybot
|
||||||
|
import supybot.src.world
|
||||||
|
|
||||||
|
supybot.src.world.documenting = True
|
||||||
|
|
||||||
if not os.path.exists('test-conf'):
|
if not os.path.exists('test-conf'):
|
||||||
os.mkdir('test-conf')
|
os.mkdir('test-conf')
|
||||||
|
|
||||||
registryFilename = os.path.join('test-conf', 'test.conf')
|
registryFilename = os.path.join('test-conf', 'test.conf')
|
||||||
fd = file(registryFilename, 'w')
|
fd = file(registryFilename, 'w')
|
||||||
fd.write("""
|
fd.write("""
|
||||||
@ -329,6 +332,6 @@ if __name__ == '__main__':
|
|||||||
makePluginDocumentation(pluginWindow)
|
makePluginDocumentation(pluginWindow)
|
||||||
finishIndex()
|
finishIndex()
|
||||||
makeCommandsIndex()
|
makeCommandsIndex()
|
||||||
|
|
||||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user