in ConfigMgr::get(),the parent's instance can't access it's child
authorjingui.ren <jingui.ren@samsung.com>
Wed, 7 Feb 2018 02:42:48 +0000 (10:42 +0800)
committerRen Jingui <jingui.ren@samsung.com>
Mon, 26 Feb 2018 09:07:24 +0000 (09:07 +0000)
class method BizConfigManager::get_optional_item(),it should be
moved to parent class.

Change-Id: I1d773a640a23629bdcd1352cd089b00d9530aa55

gitbuildsys/conf.py

index 5c01f28..798dc86 100644 (file)
@@ -407,6 +407,13 @@ url = http://download.tizen.org/releases/daily/trunk/ivi/latest/
                 return True
         return False
 
+    def get_optional_item(self, section, option, default=None):
+        '''return default if section.option does not exist'''
+        try:
+            return self.get(option, section)
+        except errors.ConfigError:
+            return default
+
 
     def get(self, opt, section='general'):
         'get item value. return plain text of password if item is passwd'
@@ -636,13 +643,6 @@ class BizConfigManager(ConfigMgr):
                     'Please check %s, a new profile oriented style of config '
                     ' which was converted from your current settings.' % fname)
 
-    def get_optional_item(self, section, option, default=None):
-        '''return default if section.option does not exist'''
-        try:
-            return self.get(option, section)
-        except errors.ConfigError:
-            return default
-
     def _get_url_options(self, section_id):
         '''get url/user/passwd from a section'''
         url = os.path.expanduser(self._interpolate(self.get('url', section_id)))