If you make two try/except blocks (one for each line), and the first one fails, you can bail at that point