From bcd5415b0a58ad75b7b3db158d7443946d042f44 Mon Sep 17 00:00:00 2001 From: Martin Baeuml Date: Wed, 19 Mar 2014 22:35:59 +0100 Subject: [PATCH] fix bug in factory --- sloth/items/factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sloth/items/factory.py b/sloth/items/factory.py index b511600..6f3002d 100644 --- a/sloth/items/factory.py +++ b/sloth/items/factory.py @@ -52,10 +52,10 @@ class Factory: Type for which the mapping should be removed. If None, all mappings will be removed. """ - _type = str(_type) if _type is None: self._items = {} else: + _type = str(_type) if _type in self._items: del self._items[_type]