/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/osutils.py

  • Committer: Jelmer Vernooij
  • Date: 2019-06-03 21:25:01 UTC
  • mto: This revision was merged to the branch mainline in revision 7318.
  • Revision ID: jelmer@jelmer.uk-20190603212501-zgt2czrlc6oqoi7a
Fix tests on python 2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1693
1693
        trace.mutter('Unable to get fs type for %r: %s', path, e)
1694
1694
    else:
1695
1695
        if fs_type in ('vfat', 'ntfs'):
1696
 
            # filesystems known to not support executable bit
 
1696
            # filesystems known to not support symlinks
1697
1697
            return False
1698
1698
    return True
1699
1699
 
2646
2646
        import psutil
2647
2647
    except ImportError as e:
2648
2648
        raise errors.DependencyNotPresent('psutil', e)
 
2649
 
 
2650
    if not PY3 and not isinstance(path, str):
 
2651
        path = path.encode(_fs_enc)
 
2652
 
2649
2653
    for part in sorted(psutil.disk_partitions(), key=lambda x: len(x.mountpoint), reverse=True):
2650
2654
        if is_inside(part.mountpoint, path):
2651
2655
            return part.fstype