From 5112ed48d1cccec84a201d7c9c2dd36fcde78165 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 6 Jun 2011 14:57:50 -0700 Subject: [PATCH] Fix starting deluge-web when using osx/windows since the options are presented, the later conditionals fail since the options object does not have those attributes --- deluge/ui/web/web.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deluge/ui/web/web.py b/deluge/ui/web/web.py index e1e2db03c..81ef22e72 100644 --- a/deluge/ui/web/web.py +++ b/deluge/ui/web/web.py @@ -100,7 +100,7 @@ class Web(_UI): # Steps taken from http://www.faqs.org/faqs/unix-faq/programmer/faq/ # Section 1.7 - if self.options.fork: + if self.options.ensure_value("fork", None): # fork() so the parent can exit, returns control to the command line # or shell invoking the program. if os.fork(): @@ -121,12 +121,12 @@ class Web(_UI): if self.options.pidfile: open(self.options.pidfile, "wb").write("%d\n" % os.getpid()) - if self.options.group: + if self.options.ensure_value("group", None): if not self.options.group.isdigit(): import grp self.options.group = grp.getgrnam(self.options.group)[2] os.setuid(self.options.group) - if self.options.user: + if self.options.ensure_value("user", None): if not self.options.user.isdigit(): import pwd self.options.user = pwd.getpwnam(self.options.user)[2] @@ -141,7 +141,7 @@ class Web(_UI): if self.options.port: self.server.port = self.options.port - if self.options.ssl: + if self.options.ensure_value("ssl", None): self.server.https = self.options.ssl if self.options.profile: