Merge pull request #51280 from garethgreenaway/merge-2019.2-rc

[2019.2] Merge forward from 2019.2.0rc1 to 2019.2
This commit is contained in:
Pedro Algarvio 2019-01-23 07:08:31 +00:00 committed by GitHub
commit d22409694e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -406,6 +406,7 @@ class Pillar(object):
if not isinstance(self.extra_minion_data, dict):
self.extra_minion_data = {}
log.error('Extra minion data must be a dictionary')
self._closing = False
def __valid_on_demand_ext_pillar(self, opts):
'''
@ -1109,6 +1110,17 @@ class Pillar(object):
log.error(msg, exc_info=True)
return errors
def destroy(self):
'''
This method exist in order to be API compatible with RemotePillar
'''
if self._closing:
return
self._closing = True
def __del__(self):
self.destroy()
# TODO: actually migrate from Pillar to AsyncPillar to allow for futures in
# ext_pillar etc.