[Piglit] [PATCH 08/11] profile.py: Cleanup a few pylint warnings

Dylan Baker baker.dylan.c at gmail.com
Fri Apr 25 13:27:40 PDT 2014


This adds self._dmesg definition to the TestProfile constructor (this
isn't necessary but it's good form), and renames self.__dmesg to
self._dmesg. A double underscore is not about making an name or method
private, it's about making it invisible to that class's children. We
don't want to hide self._dmesg from any children of TestProfile.
---
 framework/profile.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/framework/profile.py b/framework/profile.py
index 25f82b0..7decef0 100644
--- a/framework/profile.py
+++ b/framework/profile.py
@@ -62,13 +62,14 @@ class TestProfile(object):
         self.test_list = {}
         self.filters = []
         # Sets a default of a Dummy
+        self._dmesg = None
         self.dmesg = False
         self.results_dir = None
 
     @property
     def dmesg(self):
         """ Return dmesg """
-        return self.__dmesg
+        return self._dmesg
 
     @dmesg.setter
     def dmesg(self, not_dummy):
@@ -79,7 +80,7 @@ class TestProfile(object):
                      will get a DummyDmesg
 
         """
-        self.__dmesg = get_dmesg(not_dummy)
+        self._dmesg = get_dmesg(not_dummy)
 
     def flatten_group_hierarchy(self):
         """ Flatten nested dictionary structure
-- 
2.0.0.rc0



More information about the Piglit mailing list