]> p2p-next.cs.pub.ro Git - cs-p2p-next.git/commitdiff
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 a5be85f41fc31080f847106c891a3368f2224ceb..3d70e0ee1c62341f1f84046c4af99c6f3caba578 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