From cb1c2091c7576801206b21b56bbce7486cd70ffa Mon Sep 17 00:00:00 2001 From: "jingui.ren" Date: Wed, 7 Feb 2018 10:42:48 +0800 Subject: [PATCH] in ConfigMgr::get(),the parent's instance can't access it's child class method BizConfigManager::get_optional_item(),it should be moved to parent class. Change-Id: I1d773a640a23629bdcd1352cd089b00d9530aa55 --- gitbuildsys/conf.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gitbuildsys/conf.py b/gitbuildsys/conf.py index 5c01f28..798dc86 100644 --- a/gitbuildsys/conf.py +++ b/gitbuildsys/conf.py @@ -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))) -- 2.34.1