# HG changeset patch # User Sylvain Thénault # Date 1284629305 -7200 # Node ID 7eb5f1aed72898bafd9d60239ae703bf94fc715b # Parent da77d3f95079079edc391c28faeef86446138130 [repo] new method on repo+dbapi.Connection to get a value from repository's configuration diff -r da77d3f95079 -r 7eb5f1aed728 dbapi.py --- a/dbapi.py Thu Sep 16 11:27:50 2010 +0200 +++ b/dbapi.py Thu Sep 16 11:28:25 2010 +0200 @@ -639,6 +639,11 @@ return self._repo.get_schema() @check_not_closed + def get_option_value(self, option): + """return the value for `option` in the repository configuration.""" + return self._repo.get_option_value(option) + + @check_not_closed def describe(self, eid): return self._repo.describe(self.sessionid, eid, **self._txid()) diff -r da77d3f95079 -r 7eb5f1aed728 server/repository.py --- a/server/repository.py Thu Sep 16 11:27:50 2010 +0200 +++ b/server/repository.py Thu Sep 16 11:28:25 2010 +0200 @@ -461,6 +461,14 @@ cubes.remove('cubicweb') return cubes + def get_option_value(self, option): + """Return the value for `option` in the configuration. + + This is a public method, not requiring a session id. + """ + # XXX we may want to check we don't give sensible information + return self.config[option] + @cached def get_versions(self, checkversions=False): """Return the a dictionary containing cubes used by this instance