Move creation of userdata.conf to scripts/supybot just to ensure that we're

not trying to create it before the directories exist.
This commit is contained in:
James Vega 2004-06-19 18:57:42 +00:00
parent 18138da1c0
commit 61d6e029b1
2 changed files with 17 additions and 19 deletions

View File

@ -343,6 +343,14 @@ if __name__ == '__main__':
if not os.path.exists(conf.supybot.directories.data()):
os.mkdir(conf.supybot.directories.data())
userdataFilename = os.path.join(supybot.directories.conf(),'userdata.conf')
# Let's open this now since we've got our directories setup.
if not os.path.exists(userdataFilename):
fd = file(userdataFilename, 'w')
fd.write('\n')
fd.close()
registry.open(userdataFilename)
import irclib
import ircmsgs
import drivers
@ -415,5 +423,4 @@ if __name__ == '__main__':
main()
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:

View File

@ -596,13 +596,4 @@ registerGlobalValue(supybot.debug, 'flushVeryOften',
flush all flushers *very* often. Useful for debugging when you don't know
what's breaking or when, but think that it might be logged."""))
# Let's open this now since we've got our directories setup.
userdataFilename = os.path.join(supybot.directories.conf(), 'userdata.conf')
if not os.path.exists(userdataFilename):
fd = file(userdataFilename, 'w')
fd.write('\n')
fd.close()
registry.open(userdataFilename)
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: