projects
/
invirt/packages/python-afs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
It seems like roughly release time.
[invirt/packages/python-afs.git]
/
afs
/
fs.py
diff --git
a/afs/fs.py
b/afs/fs.py
index
0044c05
..
02c2756
100644
(file)
--- a/
afs/fs.py
+++ b/
afs/fs.py
@@
-1,2
+1,13
@@
-import _fs
-from _fs import whichcell
+import errno
+from afs import _fs
+from afs._fs import whichcell
+
+def inafs(path):
+ """Return True if a path is in AFS."""
+ try:
+ whichcell(path)
+ except OSError, e:
+ if e.errno in (errno.EINVAL, errno.ENOENT):
+ return False
+
+ return True