- ok = False
- while not ok:
- my_id = random.randint(0, max_id)
- ok = not my_id in all_ids
- start_date = i * 10
- line = " <process host=\"c-%d.me\" function=\"bittorrent.Peer\"><argument value=\"%d\" /><argument value=\"%d\" />" % (i, my_id, end_date)
- if random.randint(0,100) < seed_percentage:
- line += "<argument value=\"1\" />"
- line += "</process>\n";
- sys.stdout.write(line)
- all_ids.append(my_id)
+ ok = False
+ while not ok:
+ my_id = random.randint(0, max_id)
+ ok = not my_id in all_ids
+ start_date = i * 10
+ line = " <process host=\"c-%d.me\" function=\"bittorrent.Peer\"><argument value=\"%d\" /><argument value=\"%d\" />" % (
+ i, my_id, end_date)
+ if random.randint(0, 100) < seed_percentage:
+ line += "<argument value=\"1\" />"
+ line += "</process>\n"
+ sys.stdout.write(line)
+ all_ids.append(my_id)