From abcde4b9219ceaa81840d5071aaa4e6845d0b2b3 Mon Sep 17 00:00:00 2001 From: Martin Baeuml Date: Wed, 29 Jun 2011 15:10:57 +0200 Subject: [PATCH] make item/inserter factory case sensitive --- sloth/items/factory.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sloth/items/factory.py b/sloth/items/factory.py index 0043be9..d3b8195 100644 --- a/sloth/items/factory.py +++ b/sloth/items/factory.py @@ -32,8 +32,6 @@ class Factory: item: python callable or string Reference to the callable which creates the new object. """ - _type = _type.lower() - if _type in self.items_ and not replace: raise Exception("Type %s already has an item: %s" % \ (_type, str(self.items_[_type]))) @@ -55,7 +53,6 @@ class Factory: if _type is None: self.items_ = {} else: - _type = _type.lower() if _type in self.items_: del self.items_[_type] @@ -76,8 +73,6 @@ class Factory: Newly created object. If for the given type no mapping exists, this function returns ``None``. """ - _type = str(_type).lower() - if _type not in self.items_: return None item = self.items_[_type]