Apparently some mis-implemented Linux filesystems (selinuxfs) have regular
files that can be opened for read, but return EINVAL when you try to read
them. We would throw a fatal exception in that case (since we're not
supposed to have read errors ever, and thus that implies something happened
that we didn't think of) but I guess we'd better make this into a non-fatal
error. It still makes the exit code nonzero so you can see that something
didn't work, though.
Reported by Zoran Zaric.
Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
add_error(e)
lastskip_name = ent.name
else:
- (mode, id) = hashsplit.split_to_blob_or_tree(w, [f], False)
+ try:
+ (mode, id) = hashsplit.split_to_blob_or_tree(w, [f],
+ keep_boundaries=False)
+ except IOError, e:
+ add_error('%s: %s' % (ent.name, e))
+ lastskip_name = ent.name
else:
if stat.S_ISDIR(ent.mode):
assert(0) # handled above