summaryrefslogtreecommitdiff
path: root/heat/engine/template_files.py
diff options
context:
space:
mode:
Diffstat (limited to 'heat/engine/template_files.py')
-rw-r--r--heat/engine/template_files.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/heat/engine/template_files.py b/heat/engine/template_files.py
index 0e7f6e77e..55a54e0d6 100644
--- a/heat/engine/template_files.py
+++ b/heat/engine/template_files.py
@@ -12,7 +12,6 @@
# under the License.
import collections
-import six
import weakref
from heat.common import context
@@ -29,7 +28,7 @@ class ReadOnlyDict(dict):
raise ValueError("Attempted to write to internal TemplateFiles cache")
-class TemplateFiles(collections.Mapping):
+class TemplateFiles(collections.abc.Mapping):
def __init__(self, files):
self.files = None
@@ -40,7 +39,7 @@ class TemplateFiles(collections.Mapping):
self.files_id = files.files_id
self.files = files.files
return
- if isinstance(files, six.integer_types):
+ if isinstance(files, int):
self.files_id = files
if self.files_id in _d:
self.files = _d[self.files_id]
@@ -50,7 +49,7 @@ class TemplateFiles(collections.Mapping):
'(value is %(val)s)') %
{'cname': files.__class__,
'val': str(files)})
- # the dict has not been persisted as a raw_template_files db obj
+ # the dict has not been persisted as a raw_template_files DB obj
# yet, so no self.files_id
self.files = ReadOnlyDict(files)
@@ -82,7 +81,7 @@ class TemplateFiles(collections.Mapping):
return iter(self.files)
def _refresh_if_needed(self):
- # retrieve files from db if needed
+ # retrieve files from DB if needed
if self.files_id is None:
return
if self.files_id in _d:
@@ -112,13 +111,13 @@ class TemplateFiles(collections.Mapping):
def update(self, files):
# Sets up the next call to store() to create a new
- # raw_template_files db obj. It seems like we *could* just
+ # raw_template_files DB obj. It seems like we *could* just
# update the existing raw_template_files obj, but the problem
# with that is other heat-engine processes' _d dictionaries
# would have stale data for a given raw_template_files.id with
# no way of knowing whether that data should be refreshed or
# not. So, just avoid the potential for weird race conditions
- # and create another db obj in the next store().
+ # and create another DB obj in the next store().
if len(files) == 0:
return
if not isinstance(files, dict):