I am ready to run this code but before I want to fix the exception handling:
for l in bios:
OpenThisLink = url + l
try:
response = urllib2.urlope
Use continue
instead of break
.
The statement pass
is a no-op (meaning that it doesn't do anything). The program just continues to the next statement, which is why you get an error.
break
exits the loops and continues running from the next statement immediately after the loop. In this case, there are no more statements, which is why your program terminates.
continue
restarts the loop but with the next item. This is exactly what you want.