From dfe6daa2c2a6fc780cbe82dc1d2a56b575ab7086 Mon Sep 17 00:00:00 2001 From: p2p Date: Thu, 11 Mar 2010 12:26:44 +0000 Subject: [PATCH] server - fixed command arguments bug in BitTorrentClientRun. --- bt_comm/start-clients/BitTorrentClientRun.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bt_comm/start-clients/BitTorrentClientRun.py b/bt_comm/start-clients/BitTorrentClientRun.py index a5be85f..3d70e0e 100644 --- a/bt_comm/start-clients/BitTorrentClientRun.py +++ b/bt_comm/start-clients/BitTorrentClientRun.py @@ -63,7 +63,15 @@ class BitTorrentClientRun: args = shlex.split(command) if(DEBUG): print "BitTorrentClientRun: command =", args - + + # remove redirectation parameters + for i in range(0, len(args)): + if args[i].find(">") > -1 : + for j in range(i, len(args)): + args.pop(i) + break; + + log_redirect = open(self.log_dir+"/"+self.log_file,"w") output_redirect = open(self.output_dir+"/"+self.output_file,"w") p=subprocess.Popen(args, shell=False, #does not create sh process -- 2.20.1