try:
    pk = a_method_that_may_rise_an_exception()
except:
    pass
else:
    if pk:
        process_pk()
return
method_to_be_executed_in_case_of_exception_or_pk_is_false()
Python try-except with of if else