Merge "Correct _ensure_console_log_for_instance implementation"
This commit is contained in:
commit
7916941571
|
@ -10991,7 +10991,7 @@ class LibvirtConnTestCase(test.NoDBTestCase):
|
|||
with test.nested(
|
||||
mock.patch.object(drvr, '_get_console_log_path'),
|
||||
mock.patch.object(fake_libvirt_utils, 'file_open',
|
||||
side_effect=IOError(errno.EPERM, 'exc'))
|
||||
side_effect=IOError(errno.EACCES, 'exc'))
|
||||
) as (mock_path, mock_open):
|
||||
drvr._ensure_console_log_for_instance(mock.ANY)
|
||||
mock_path.assert_called_once()
|
||||
|
|
|
@ -3010,7 +3010,7 @@ class LibvirtDriver(driver.ComputeDriver):
|
|||
# NOTE(sfinucan): We can safely ignore permission issues here and
|
||||
# assume that it is libvirt that has taken ownership of this file.
|
||||
except IOError as ex:
|
||||
if ex.errno != errno.EPERM:
|
||||
if ex.errno != errno.EACCES:
|
||||
raise
|
||||
LOG.debug('Console file already exists: %s.', console_file)
|
||||
|
||||
|
|
Loading…
Reference in New Issue