Fix #943 exception when options is None

This commit is contained in:
Andrew Resch 2009-05-20 21:39:02 +00:00
parent f78cf72544
commit b4a329474a
1 changed files with 5 additions and 5 deletions

View File

@ -147,12 +147,12 @@ class Daemon(object):
# Make sure we start the PreferencesManager first
component.start("PreferencesManager")
if not classic:
# Write out a pid file all the time, we use this to see if a deluged is running
# We also include the running port number to do an additional test
open(deluge.configmanager.get_config_dir("deluged.pid"), "wb").write(
"%s;%s\n" % (os.getpid(), options.port if options.port else 58846))
"%s;%s\n" % (os.getpid(), port))
if not classic:
component.start()
try:
reactor.run()