The source project of this merge request has been removed.
1 unresolved thread
1 unresolved thread
Using "for" loops instead of "while".
Testing this code : I get errors when using the "net" command on the default g1 server. Not on duniter.moul.re.
socket.timeout: The read operation timed out
Edited by matograine
Merge request reports
Activity
Filter activity
changed title from WIP : FOR loops issue #157 (closed) to WIP : FOR loops issue #157 (closed) + str(wide) #169
added 1 commit
- 2787b458 - adding str to "wide" so the error message gets correctly displayed.
168 168 except: 169 169 return NO_MATCHING_ID 170 170 i, results = 0, results["results"] 171 while i < len(results): 171 for i in range( len(results) ): 172 172 if results[i]["uids"][0]["uid"] != pubkey: 173 173 return results[i]["uids"][0]["uid"] A better solution would be to use:
for result in results: if result["uids"][0]["uid"] !=pubkey:
Same for upper modification.
Edited by Moul
changed milestone to %0.7.0
assigned to @moul
added enhancement label
Please register or sign in to reply