Change-Id: I6ea9c031a8093d7ce94b49575cb6bfe348eb6c9a
Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+from six.moves import configparser
config = configparser.ConfigParser()
config.read(co_conf)
config = configparser.ConfigParser()
config.read(co_conf)
- drivers = config['DEFAULT']['drivers']
+ drivers = config.get('DEFAULT', 'drivers')
if doctor_driver not in drivers:
config_modified = True
drivers += ',' + doctor_driver
if doctor_driver not in drivers:
config_modified = True
drivers += ',' + doctor_driver
- config['DEFAULT']['drivers'] = drivers
+ config.set('DEFAULT', 'drivers', drivers)
if config_modified:
shutil.copyfile(co_conf, co_conf_bak)
if config_modified:
shutil.copyfile(co_conf, co_conf_bak)