Module: deluge
Branch: master
Commit: 5112ed48d1cccec84a201d7c9c2dd36fcde78165

Author: Andrew Resch <[email protected]>
Date:   Mon Jun  6 14:57:50 2011 -0700

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 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/deluge/ui/web/web.py b/deluge/ui/web/web.py
index e1e2db0..81ef22e 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:

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to