mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
tests_py3: decode get_file_contents() result
When running tests in python3 we get bytes object instead of bytestring from get_file_contents() and when passing it to run_command() we later fail on concatenation in shell_quote(). https://pagure.io/freeipa/issue/7131 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
committed by
Stanislav Laznicka
parent
af1b8513ab
commit
3b5e979334
@@ -228,7 +228,7 @@ def restore_files(host):
|
||||
def restore_hostname(host):
|
||||
backupname = os.path.join(host.config.test_dir, 'backup_hostname')
|
||||
try:
|
||||
hostname = host.get_file_contents(backupname)
|
||||
hostname = host.get_file_contents(backupname, encoding='utf-8')
|
||||
except IOError:
|
||||
logger.debug('No hostname backed up on %s', host.hostname)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user