[ARVADOS] updated: dd40196040d77df4163b3f7fabf92a0a7559aabf
Git user
git at public.curoverse.com
Thu Mar 10 15:25:46 EST 2016
Summary of changes:
services/fuse/arvados_fuse/__init__.py | 15 ++++++---------
services/fuse/arvados_fuse/fusefile.py | 6 ++++++
2 files changed, 12 insertions(+), 9 deletions(-)
via dd40196040d77df4163b3f7fabf92a0a7559aabf (commit)
via dd9b12612d78cf25a81c3f94a7458408a2ae23b8 (commit)
from b257d006610748cb133c352f9ce95b61d1c66e17 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit dd40196040d77df4163b3f7fabf92a0a7559aabf
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Mar 10 15:25:41 2016 -0500
8345: Do not crash when update() called without an obj.
diff --git a/services/fuse/arvados_fuse/fusefile.py b/services/fuse/arvados_fuse/fusefile.py
index e731327..3f0e493 100644
--- a/services/fuse/arvados_fuse/fusefile.py
+++ b/services/fuse/arvados_fuse/fusefile.py
@@ -95,6 +95,12 @@ class ObjectFile(StringFile):
return self.object_uuid
def update(self, obj=None):
+ if obj is None:
+ # TODO: retrieve the current record for self.object_uuid
+ # from the server. For now, at least don't crash when
+ # someone tells us it's a good time to update but doesn't
+ # pass us a fresh obj. See #8345
+ return
self._mtime = convertTime(obj['modified_at']) if 'modified_at' in obj else 0
self.contents = json.dumps(obj, indent=4, sort_keys=True) + "\n"
commit dd9b12612d78cf25a81c3f94a7458408a2ae23b8
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Mar 10 15:04:10 2016 -0500
8345: Revert change to getattr() @catch_exceptions setup.
diff --git a/services/fuse/arvados_fuse/__init__.py b/services/fuse/arvados_fuse/__init__.py
index f1853d2..ec919d3 100644
--- a/services/fuse/arvados_fuse/__init__.py
+++ b/services/fuse/arvados_fuse/__init__.py
@@ -398,10 +398,7 @@ class Operations(llfuse.Operations):
@catch_exceptions
- def getattr(self, inode, ctx):
- return self._getattr(inode)
-
- def _getattr(self, inode):
+ def getattr(self, inode, ctx=None):
if inode not in self.inodes:
raise llfuse.FUSEError(errno.ENOENT)
@@ -441,7 +438,7 @@ class Operations(llfuse.Operations):
@catch_exceptions
def setattr(self, inode, attr, fields, fh, ctx):
- entry = self._getattr(inode)
+ entry = self.getattr(inode)
if fh is not None and fh in self._filehandles:
handle = self._filehandles[fh]
@@ -476,7 +473,7 @@ class Operations(llfuse.Operations):
_logger.debug("arv-mount lookup: parent_inode %i name '%s' inode %i",
parent_inode, name, inode)
self.inodes[inode].inc_ref()
- return self._getattr(inode)
+ return self.getattr(inode)
else:
_logger.debug("arv-mount lookup: parent_inode %i name '%s' not found",
parent_inode, name)
@@ -601,7 +598,7 @@ class Operations(llfuse.Operations):
e = off
while e < len(handle.entries):
if handle.entries[e][1].inode in self.inodes:
- yield (handle.entries[e][0].encode(self.inodes.encoding), self._getattr(handle.entries[e][1].inode), e+1)
+ yield (handle.entries[e][0].encode(self.inodes.encoding), self.getattr(handle.entries[e][1].inode), e+1)
e += 1
@catch_exceptions
@@ -651,7 +648,7 @@ class Operations(llfuse.Operations):
self.inodes.touch(p)
f.inc_ref()
- return (fh, self._getattr(f.inode))
+ return (fh, self.getattr(f.inode))
@catch_exceptions
def mkdir(self, inode_parent, name, mode, ctx):
@@ -664,7 +661,7 @@ class Operations(llfuse.Operations):
d = p[name]
d.inc_ref()
- return self._getattr(d.inode)
+ return self.getattr(d.inode)
@catch_exceptions
def unlink(self, inode_parent, name, ctx):
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list