source: trunk/packages/python-afs/afs/fs.py @ 2971

Last change on this file since 2971 was 2599, checked in by broder, 15 years ago

Import python-afs.

Debathena should eventually be importing PyAFS for
<http://debathena.mit.edu/trac/ticket/395>, so hopefully this is only
temporary.

File size: 274 bytes
Line 
1import errno
2from afs import _fs
3from afs._fs import whichcell
4
5def inafs(path):
6    """Return True if a path is in AFS."""
7    try:
8        whichcell(path)
9    except OSError, e:
10        if e.errno in (errno.EINVAL, errno.ENOENT):
11            return False
12
13    return True
Note: See TracBrowser for help on using the repository browser.