mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 20:31:27 -07: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:
parent
ad8cb903f4
commit
36d7c0c403
3 changed files with 22 additions and 12 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue