Fix bugs the instance of ConfigMgr class can not access get_optional_item method 53/173653/2
authorjingui.ren <jingui.ren@samsung.com>
Fri, 23 Mar 2018 02:46:13 +0000 (10:46 +0800)
committerjingui.ren <jingui.ren@samsung.com>
Fri, 23 Mar 2018 03:01:10 +0000 (11:01 +0800)
Change-Id: I1b63b6240f34e34dc6d29b1af6ed9ff4ef2e84c9
Signed-off-by: jingui.ren <jingui.ren@samsung.com>
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)))