Created
December 19, 2015 20:24
-
-
Save ssbb/9b040325f6e9145e7b43 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
urls = [1, 2, 3] | |
def main(): | |
while urls: | |
item = urls.pop(0) | |
print('Processing item: {}'.format(item)) | |
tries = 0 | |
while tries < 4: | |
try: | |
raise Exception('My Exception') | |
# Use break statement at the end. | |
except Exception: | |
print('error') | |
tries += 1 | |
else: | |
return | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment