mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
[#2818] [WebUI] Fix AttributeError starting WebUI on windows
This commit is contained in:
parent
c821cdd9c7
commit
c274d5114c
1 changed files with 11 additions and 10 deletions
|
@ -84,16 +84,17 @@ class Web(UI):
|
||||||
if self.options.pidfile:
|
if self.options.pidfile:
|
||||||
open(self.options.pidfile, "wb").write("%d\n" % os.getpid())
|
open(self.options.pidfile, "wb").write("%d\n" % os.getpid())
|
||||||
|
|
||||||
if self.options.group:
|
if not windows_check():
|
||||||
if not self.options.group.isdigit():
|
if self.options.group:
|
||||||
import grp
|
if not self.options.group.isdigit():
|
||||||
self.options.group = grp.getgrnam(self.options.group)[2]
|
import grp
|
||||||
os.setuid(self.options.group)
|
self.options.group = grp.getgrnam(self.options.group)[2]
|
||||||
if self.options.user:
|
os.setuid(self.options.group)
|
||||||
if not self.options.user.isdigit():
|
if self.options.user:
|
||||||
import pwd
|
if not self.options.user.isdigit():
|
||||||
self.options.user = pwd.getpwnam(self.options.user)[2]
|
import pwd
|
||||||
os.setuid(self.options.user)
|
self.options.user = pwd.getpwnam(self.options.user)[2]
|
||||||
|
os.setuid(self.options.user)
|
||||||
|
|
||||||
from deluge.ui.web import server
|
from deluge.ui.web import server
|
||||||
self.__server = server.DelugeWeb(options=self.options)
|
self.__server = server.DelugeWeb(options=self.options)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue