diff options
author | Marcos Pinto <markybob@dipconsultants.com> | 2007-10-15 17:03:46 +0000 |
---|---|---|
committer | Marcos Pinto <markybob@dipconsultants.com> | 2007-10-15 17:03:46 +0000 |
commit | 871d0d15c64eeb126767924a3824c8f61e3eda53 (patch) | |
tree | 9426f5be7b29ca66884866fb24359eafac45db79 | |
parent | 27d7e8065873f220d1f00bb07c8490eb25893e80 (diff) | |
download | deluge-871d0d15c64eeb126767924a3824c8f61e3eda53.tar.gz deluge-871d0d15c64eeb126767924a3824c8f61e3eda53.tar.bz2 deluge-871d0d15c64eeb126767924a3824c8f61e3eda53.zip |
fix webui kill if already running
-rw-r--r-- | plugins/WebUi/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/WebUi/__init__.py b/plugins/WebUi/__init__.py index eebdb4c1b..788a43c67 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 - 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) + status = commands.getstatusoutput('ps x |grep -v grep |grep run_webserver') + if status[0] == 0: + os.kill(status[1].split()[0], 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) |