From b4a329474a3ef0ee4afdfc7959e050a46ac13b09 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Wed, 20 May 2009 21:39:02 +0000 Subject: [PATCH] Fix #943 exception when options is None --- deluge/core/daemon.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deluge/core/daemon.py b/deluge/core/daemon.py index 5a9294db2..ecbfbe984 100644 --- a/deluge/core/daemon.py +++ b/deluge/core/daemon.py @@ -147,12 +147,12 @@ class Daemon(object): # Make sure we start the PreferencesManager first component.start("PreferencesManager") - # 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)) - 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(), port)) + component.start() try: reactor.run()