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:
Toshio Kuratomi 2017-04-17 15:05:10 -07:00
parent ad8cb903f4
commit 36d7c0c403
3 changed files with 22 additions and 12 deletions

View file

@ -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