def executed(patchmodule):
 if patchmodule.startswith(u'finally:'):
  patchmodule = patchmodule.replace(u'finally:', u'')
 done = frappe.db.get_value(u'Patch Log', {u'patch': patchmodule})
 return done

def executed ( patchmodule ) : if patchmodule . startswith ( u'finally:' ) : patchmodule = patchmodule . replace ( u'finally:' , u'' ) done = frappe . db . get_value ( u'Patch Log' , { u'patch' : patchmodule } ) return done
return true if is executed .