summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcos Pinto <markybob@dipconsultants.com>2007-10-15 00:20:48 +0000
committerMarcos Pinto <markybob@dipconsultants.com>2007-10-15 00:20:48 +0000
commit715874df58af20b1d584544697ce729fe78d7b78 (patch)
treecf932edecfc51a5d3374b86124d1ff84c5325639
parent87fe5fe4ad8c02991f85671f7ba3d54782459cdc (diff)
downloaddeluge-715874df58af20b1d584544697ce729fe78d7b78.tar.gz
deluge-715874df58af20b1d584544697ce729fe78d7b78.tar.bz2
deluge-715874df58af20b1d584544697ce729fe78d7b78.zip
tweak last
-rw-r--r--plugins/WebUi/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/WebUi/__init__.py b/plugins/WebUi/__init__.py
index 569773c1e..eebdb4c1b 100644
--- a/plugins/WebUi/__init__.py
+++ b/plugins/WebUi/__init__.py
@@ -80,9 +80,9 @@ class plugin_WebUi(object):
self.web_server = None
if not deluge.common.windows_check():
import commands
- pid = commands.getstatus('ps x |grep -v grep |grep run_webserver |awk {\'print $1\'}')
- if pid == 0:
- os.kill(pid[1], 9)
+ status = commands.getstatus('ps x |grep -v grep |grep run_webserver')
+ if status == 0:
+ os.kill(commands.getoutput('ps x |grep -v grep |grep run_webserver |awk {\'print $1\'}'), 9)
time.sleep(1) #safe time to wait for kill to finish.
self.config_file = deluge.common.CONFIG_DIR + "/webui.conf"
self.config = deluge.pref.Preferences(self.config_file, False)