Project

General

Profile

Actions

Feature #10014

closed

[SDKs] Python SDK should be more forthcoming when a file can't be found in a collection: list the path that can't be found

Added by Ward Vandewege over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
SDKs
Target version:
Story points:
-

Description

I propose a patch along these lines:

diff --git a/sdk/python/arvados/collection.py b/sdk/python/arvados/collection.py
index 56d8b23..0722f28 100644
--- a/sdk/python/arvados/collection.py
+++ b/sdk/python/arvados/collection.py
@@ -802,7 +802,7 @@ class RichCollectionBase(CollectionBase):
         if isinstance(source, basestring):
             source_obj = source_collection.find(source)
             if source_obj is None:
-                raise IOError(errno.ENOENT, "File not found")
+                raise IOError(errno.ENOENT, "File not found", source)
             sourcecomponents = source.split("/")
         else:
             source_obj = source

Subtasks 1 (0 open1 closed)

Task #10039: Review 10014-collection-error-detailResolvedLucas Di Pentima09/14/2016Actions
Actions

Also available in: Atom PDF