diff --git a/rida.conf b/rida.conf index 609c3057..65ccee3c 100644 --- a/rida.conf +++ b/rida.conf @@ -1,5 +1,6 @@ [DEFAULT] system = koji +messaging = fedmsg koji = http://koji.stg.fedoraproject.org/kojihub db = sqlite:///rida.db pdc = http://pdc.stg.fedoraproject.org/ diff --git a/rida/config.py b/rida/config.py index 936c8520..20226344 100644 --- a/rida/config.py +++ b/rida/config.py @@ -48,6 +48,7 @@ def from_file(filename=None): conf = Config() conf.db = default.get("db") conf.system = default.get("system") + conf.messaging = default.get("messaging") conf.pdc = default.get("pdc") conf.koji = default.get("koji") conf.scmurls = json.loads(default.get("scmurls")) @@ -59,6 +60,7 @@ class Config(object): def __init__(self): """Initialize the Config object.""" self._system = "" + self._messaging = "" self._db = "" self._pdc = "" self._koji = "" @@ -75,6 +77,18 @@ class Config(object): raise ValueError("Unsupported buildsystem.") self._system = s + @property + def messaging(self): + """The messaging system to use.""" + return self._messaging + + @messaging.setter + def messaging(self, s): + s = str(s) + if s not in ("fedmsg"): + raise ValueError("Unsupported messaging system.") + self._messaging = s + @property def db(self): """RDB URL."""