~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: John Arbash Meinel
  • Date: 2008-03-14 10:55:37 UTC
  • mfrom: (3275 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3281.
  • Revision ID: john@arbash-meinel.com-20080314105537-v9h2ue0uxvs1dyn6
[merge] bzr.dev 3275

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
    try:
150
150
        return _mapper(_lstat(f).st_mode)
151
151
    except OSError, e:
152
 
        if getattr(e, 'errno', None) == errno.ENOENT:
 
152
        if getattr(e, 'errno', None) in (errno.ENOENT, errno.ENOTDIR):
153
153
            raise errors.NoSuchFile(f)
154
154
        raise
155
155
 
849
849
        return False
850
850
 
851
851
 
 
852
def has_hardlinks():
 
853
    if getattr(os, 'link', None) is not None:
 
854
        return True
 
855
    else:
 
856
        return False
 
857
 
 
858
 
852
859
def contains_whitespace(s):
853
860
    """True if there are any whitespace characters in s."""
854
861
    # string.whitespace can include '\xa0' in certain locales, because it is