From 3073940ca46e91e54daad91ec371580d990c39c9 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Thu, 26 Sep 2013 22:35:12 +0200 Subject: [PATCH] can't assign to an OptionDescription --- tiramisu/config.py | 4 +++- translations/fr/tiramisu.po | 16 ++++++++++------ translations/tiramisu.pot | 16 ++++++++++------ 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/tiramisu/config.py b/tiramisu/config.py index 3687349..25dbaf9 100644 --- a/tiramisu/config.py +++ b/tiramisu/config.py @@ -185,7 +185,9 @@ class SubConfig(object): homeconfig, name = self.cfgimpl_get_home_by_path(name) return homeconfig.__setattr__(name, value) child = getattr(self.cfgimpl_get_description(), name) - if not isinstance(child, SymLinkOption): + if isinstance(child, OptionDescription): + raise SyntaxError(_("can't assign to an OptionDescription")) + elif not isinstance(child, SymLinkOption): if self._impl_path is None: path = name else: diff --git a/translations/fr/tiramisu.po b/translations/fr/tiramisu.po index a81e14e..0075059 100644 --- a/translations/fr/tiramisu.po +++ b/translations/fr/tiramisu.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-26 22:24+CEST\n" +"POT-Creation-Date: 2013-09-26 22:33+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Emmanuel Garette \n" "Language-Team: LANGUAGE \n" @@ -41,23 +41,27 @@ msgstr "" "pas d'option description trouvé pour cette config (peut être une metaconfig " "sans meta)" -#: tiramisu/config.py:318 +#: tiramisu/config.py:189 +msgid "can't assign to an OptionDescription" +msgstr "ne peut pas attribuer une valeur à une OptionDescription" + +#: tiramisu/config.py:320 msgid "unknown type_ type {0}for _find" msgstr "type_ type {0} pour _find inconnu" -#: tiramisu/config.py:357 +#: tiramisu/config.py:359 msgid "no option found in config with these criteria" msgstr "aucune option trouvée dans la config avec ces critères" -#: tiramisu/config.py:407 +#: tiramisu/config.py:409 msgid "make_dict can't filtering with value without option" msgstr "make_dict ne peut filtrer sur une valeur mais sans option" -#: tiramisu/config.py:428 +#: tiramisu/config.py:430 msgid "unexpected path {0}, should start with {1}" msgstr "chemin imprévu {0}, devrait commencer par {1}" -#: tiramisu/config.py:488 +#: tiramisu/config.py:490 msgid "opt in getowner must be an option not {0}" msgstr "opt dans getowner doit être une option pas {0}" diff --git a/translations/tiramisu.pot b/translations/tiramisu.pot index 7304c9f..dfd4b86 100644 --- a/translations/tiramisu.pot +++ b/translations/tiramisu.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-09-26 22:24+CEST\n" +"POT-Creation-Date: 2013-09-26 22:33+CEST\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -35,23 +35,27 @@ msgstr "" msgid "no option description found for this config (may be metaconfig without meta)" msgstr "" -#: tiramisu/config.py:318 +#: tiramisu/config.py:189 +msgid "can't assign to an OptionDescription" +msgstr "" + +#: tiramisu/config.py:320 msgid "unknown type_ type {0}for _find" msgstr "" -#: tiramisu/config.py:357 +#: tiramisu/config.py:359 msgid "no option found in config with these criteria" msgstr "" -#: tiramisu/config.py:407 +#: tiramisu/config.py:409 msgid "make_dict can't filtering with value without option" msgstr "" -#: tiramisu/config.py:428 +#: tiramisu/config.py:430 msgid "unexpected path {0}, should start with {1}" msgstr "" -#: tiramisu/config.py:488 +#: tiramisu/config.py:490 msgid "opt in getowner must be an option not {0}" msgstr ""