def check_if_expired():
 if (not has_expired()):
  return
 limits = get_limits()
 expires_on = formatdate(limits.get(u'expiry'))
 support_email = limits.get(u'support_email')
 if limits.upgrade_url:
  message = _(u'Your subscription expired on {0}. To renew, {1}.').format(expires_on, get_upgrade_link(limits.upgrade_url))
 elif support_email:
  message = _(u'Your subscription expired on {0}. To renew, please send an email to {1}.').format(expires_on, support_email)
 else:
  message = _(u'Your subscription expired on {0}').format(expires_on)
 frappe.throw(message, SiteExpiredError)

def check_if_expired ( ) : if ( not has_expired ( ) ) : return limits = get_limits ( ) expires_on = formatdate ( limits . get ( u'expiry' ) ) support_email = limits . get ( u'support_email' ) if limits . upgrade_url : message = _ ( u'Your subscription expired on {0}. To renew, {1}.' ) . format ( expires_on , get_upgrade_link ( limits . upgrade_url ) ) elif support_email : message = _ ( u'Your subscription expired on {0}. To renew, please send an email to {1}.' ) . format ( expires_on , support_email ) else : message = _ ( u'Your subscription expired on {0}' ) . format ( expires_on ) frappe . throw ( message , SiteExpiredError )
check if account is expired .