From 9b419a488d8a2853967193a77d2e3a40dac3d656 Mon Sep 17 00:00:00 2001 From: gwen Date: Wed, 19 Sep 2012 10:25:39 +0200 Subject: [PATCH] remove unicity by name commented code --- tiramisu/config.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/tiramisu/config.py b/tiramisu/config.py index b98b33f..d268787 100644 --- a/tiramisu/config.py +++ b/tiramisu/config.py @@ -38,8 +38,6 @@ class Config(object): _cfgimpl_frozen = True _cfgimpl_owner = default_owner _cfgimpl_toplevel = None -# TODO implement unicity by name -# _cfgimpl_unique_names = True def __init__(self, descr, parent=None, **overrides): self._cfgimpl_descr = descr @@ -63,26 +61,6 @@ class Config(object): else: raise ConflictConfigError('duplicate option name: ' '{0}'.format(dup._name)) - -# TODO implement unicity by name -# def _validate_duplicates_for_names(self, children): -# "validates duplicates names agains the whole config" -# rootconfig = self._cfgimpl_get_toplevel() -# if self._cfgimpl_unique_names: -# for dup in children: -# try: -# print dup._name -# try: -# print rootconfig.get(dup._name) -# except AttributeError: -# pass -# raise NotFoundError -# #rootconfig.get(dup._name) -# except NotFoundError: -# pass # no identical names, it's fine -# else: -# raise ConflictConfigError('duplicate option name: ' -# '{0}'.format(dup._name)) def _cfgimpl_build(self, overrides): self._validate_duplicates(self._cfgimpl_descr._children)