def _is_legacy_mode(config):
 write_url = config.get('ckan.datastore.write_url')
 engine = db._get_engine({'connection_url': write_url})
 connection = engine.connect()
 return ((not config.get('ckan.datastore.read_url')) or (not db._pg_version_is_at_least(connection, '9.0')))

def _is_legacy_mode ( config ) : write_url = config . get ( 'ckan.datastore.write_url' ) engine = db . _get_engine ( { 'connection_url' : write_url } ) connection = engine . connect ( ) return ( ( not config . get ( 'ckan.datastore.read_url' ) ) or ( not db . _pg_version_is_at_least ( connection , '9.0' ) ) )
decides if the datastore should run on legacy mode returns true if ckan .