~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Alexander Belchenko
  • Date: 2008-02-06 15:33:12 UTC
  • mto: This revision was merged to the branch mainline in revision 3231.
  • Revision ID: bialix@ukr.net-20080206153312-qycs7u05d7fjtwqq
Ian's review

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) in (errno.ENOENT, errno.ENOTDIR):
 
152
        if getattr(e, 'errno', None) == errno.ENOENT:
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
 
 
859
852
def contains_whitespace(s):
860
853
    """True if there are any whitespace characters in s."""
861
854
    # string.whitespace can include '\xa0' in certain locales, because it is