From: p2p Date: Thu, 11 Mar 2010 12:26:44 +0000 (+0000) Subject: server - fixed command arguments bug in BitTorrentClientRun. X-Git-Tag: getopt_long~143 X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=dfe6daa2c2a6fc780cbe82dc1d2a56b575ab7086;p=cs-p2p-next.git server - fixed command arguments bug in BitTorrentClientRun. --- 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