mirror of
https://github.com/wassname/sloth.git
synced 2026-06-27 18:25:49 +08:00
fix bug in factory
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user