Patchwork [bitbake-devel,1/2] data-smart: rename the 'content' internal variable to '_content'

login
register
mail settings
Submitter Ross Burton
Date Aug. 21, 2012, 4:16 p.m.
Message ID <1345565786-23409-1-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/35069/
State New
Headers show

Comments

Ross Burton - Aug. 21, 2012, 4:16 p.m.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 bitbake/lib/bb/data_smart.py |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
Richard Purdie - Aug. 22, 2012, 12:55 p.m.
On Tue, 2012-08-21 at 17:16 +0100, Ross Burton wrote:
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  bitbake/lib/bb/data_smart.py |   16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)

Thanks, merged to master along with 2/2.

Cheers,

Richard

Patch

diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 31216e0..dbfcefb 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -280,10 +280,10 @@  class DataSmart(MutableMapping):
                 self._seen_overrides[override].add( var )
 
         # setting var
-        self.dict[var]["content"] = value
+        self.dict[var]["_content"] = value
 
     def getVar(self, var, expand=False, noweakdefault=False):
-        value = self.getVarFlag(var, "content", False, noweakdefault)
+        value = self.getVarFlag(var, "_content", False, noweakdefault)
 
         # Call expand() separately to make use of the expand cache
         if expand and value:
@@ -340,7 +340,7 @@  class DataSmart(MutableMapping):
         if local_var:
             if flag in local_var:
                 value = copy.copy(local_var[flag])
-            elif flag == "content" and "defaultval" in local_var and not noweakdefault:
+            elif flag == "_content" and "defaultval" in local_var and not noweakdefault:
                 value = copy.copy(local_var["defaultval"])
         if expand and value:
             value = self.expand(value, None)
@@ -369,7 +369,7 @@  class DataSmart(MutableMapping):
             self._makeShadowCopy(var)
 
         for i in flags:
-            if i == "content":
+            if i == "_content":
                 continue
             self.dict[var][i] = flags[i]
 
@@ -379,7 +379,7 @@  class DataSmart(MutableMapping):
 
         if local_var:
             for i in local_var:
-                if i == "content":
+                if i == "_content":
                     continue
                 flags[i] = local_var[i]
 
@@ -396,10 +396,10 @@  class DataSmart(MutableMapping):
             content = None
 
             # try to save the content
-            if "content" in self.dict[var]:
-                content  = self.dict[var]["content"]
+            if "_content" in self.dict[var]:
+                content  = self.dict[var]["_content"]
                 self.dict[var]            = {}
-                self.dict[var]["content"] = content
+                self.dict[var]["_content"] = content
             else:
                 del self.dict[var]