Fix #943 exception when options is None
This commit is contained in:
parent
f78cf72544
commit
b4a329474a
|
@ -147,12 +147,12 @@ class Daemon(object):
|
||||||
# Make sure we start the PreferencesManager first
|
# Make sure we start the PreferencesManager first
|
||||||
component.start("PreferencesManager")
|
component.start("PreferencesManager")
|
||||||
|
|
||||||
|
if not classic:
|
||||||
# Write out a pid file all the time, we use this to see if a deluged is running
|
# 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
|
# We also include the running port number to do an additional test
|
||||||
open(deluge.configmanager.get_config_dir("deluged.pid"), "wb").write(
|
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()
|
component.start()
|
||||||
try:
|
try:
|
||||||
reactor.run()
|
reactor.run()
|
||||||
|
|
Loading…
Reference in New Issue