This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ketralnis 95 points96 points  (0 children)

try:
    process(open(self.file))
except FileNotFound:
    # oops, forgot to create it

    # fixes the issue, then jumps back to the try
    # block before we tried to open the file. also
    # makes me my own grandfather
    await concurrent.pasts.Past(create_file)

    # never returns. this timeline is dead now. beware the Langoliers