Fix deluged crashing on windows when logfile's directory doesn't exist

This commit is contained in:
John Garland 2010-05-16 13:11:18 +10:00
parent 2603c36e7d
commit bc28b83062

View File

@ -197,6 +197,11 @@ this should be an IP address", metavar="IFACE",
write_pidfile()
# Setup the logger
try:
# Try to make the logfile's directory if it doesn't exist
os.makedirs(os.path.abspath(os.path.dirname(options.logfile)))
except:
pass
deluge.log.setupLogger(level=options.loglevel, filename=options.logfile)
from deluge.log import LOG as log