Re-add cache clearing call to Inventory init

This prevents a bug where the existing cache outside of the class
is not cleared when creating a new Inventory object. This only really
affects people using the API directly right now, but wanted to fix it
to prevent weird errors from popping up.
pull/14038/head
James Cammarata 9 years ago
parent c2ac1507ea
commit 365c5b23ce

@ -78,6 +78,10 @@ class Inventory(object):
self._restriction = None self._restriction = None
self._subset = None self._subset = None
# clear the cache here, which is only useful if more than
# one Inventory objects are created when using the API directly
self.clear_pattern_cache()
self.parse_inventory(host_list) self.parse_inventory(host_list)
def serialize(self): def serialize(self):

Loading…
Cancel
Save