server - fixed command arguments bug in BitTorrentClientRun.
authorp2p <p2p@p2p-next-adriana.(none)>
Thu, 11 Mar 2010 12:26:44 +0000 (12:26 +0000)
committerp2p <p2p@p2p-next-adriana.(none)>
Thu, 11 Mar 2010 12:26:44 +0000 (12:26 +0000)
bt_comm/start-clients/BitTorrentClientRun.py

index a5be85f..3d70e0e 100644 (file)
@@ -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