def needs_renewal(name, window=None):
 if ((window is not None) and (window in ('force', 'Force', True))):
  return True
 return (_renew_by(name, window) <= datetime.datetime.today())

def needs_renewal ( name , window = None ) : if ( ( window is not None ) and ( window in ( 'force' , 'Force' , True ) ) ) : return True return ( _renew_by ( name , window ) <= datetime . datetime . today ( ) )
check if a certicate needs renewal .