Fix config file management in tests

This fixes some tests that tried to set options on python3.

Change-Id: Ib2cd36b318b4f8487045c5142fa3c200db61bc79
This commit is contained in:
Thomas Herve 2017-02-01 13:58:13 +01:00 committed by Rico Lin
parent b2421181fb
commit 3a7aee527e
1 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ class ReloadOnSighupTest(functional_base.FunctionalTestsBase):
while True: while True:
config.read(self.config_file) config.read(self.config_file)
try: try:
config.set(service, key, value) config.set(service, key, str(value))
except configparser.NoSectionError: except configparser.NoSectionError:
if retries_count <= 0: if retries_count <= 0:
raise raise
@ -58,7 +58,7 @@ class ReloadOnSighupTest(functional_base.FunctionalTestsBase):
else: else:
break break
with open(self.config_file, 'wb') as f: with open(self.config_file, 'w') as f:
config.write(f) config.write(f)
def _get_config_value(self, service, key): def _get_config_value(self, service, key):