mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-13 20:31:24 +00:00
Fix places where path needs to be bytes on python3
These were discovered on python3 with fetch code that fails on errors. Probably could be provoked with particular sets of arguments to stat as well.
This commit is contained in:
@@ -647,7 +647,7 @@ class TestModuleUtilsBasic(ModuleTestCase):
|
||||
)
|
||||
|
||||
def _mock_ismount(path):
|
||||
if path == '/':
|
||||
if path == b'/':
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -655,7 +655,9 @@ class TestModuleUtilsBasic(ModuleTestCase):
|
||||
self.assertEqual(am.find_mount_point('/root/fs/../mounted/path/to/whatever'), '/')
|
||||
|
||||
def _mock_ismount(path):
|
||||
if path == '/subdir/mount':
|
||||
if path == b'/subdir/mount':
|
||||
return True
|
||||
if path == b'/':
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user