def enforce_limit(limit):
 if (limit is None):
  limit = pecan.request.cfg.api.default_api_return_limit
  LOG.info(_LI('No limit value provided, result set will be limited to %(limit)d.'), {'limit': limit})
 if ((not limit) or (limit <= 0)):
  raise base.ClientSideError(_('Limit must be positive'))
 return limit

def enforce_limit ( limit ) : if ( limit is None ) : limit = pecan . request . cfg . api . default_api_return_limit LOG . info ( _LI ( 'No limit value provided, result set will be limited to %(limit)d.' ) , { 'limit' : limit } ) if ( ( not limit ) or ( limit <= 0 ) ) : raise base . ClientSideError ( _ ( 'Limit must be positive' ) ) return limit
ensure limit is defined and is valid .