This is an automated email from the ASF dual-hosted git repository.
eamonford pushed a commit to branch s3-support
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-ingester.git
The following commit(s) were added to refs/heads/s3-support by this push:
new a20e85d Collection.py should support s3 path schemes
a20e85d is described below
commit a20e85d19f71e173ced65f59631c628d638c1539
Author: Eamon Ford <[email protected]>
AuthorDate: Thu Oct 8 11:20:33 2020 -0700
Collection.py should support s3 path schemes
---
collection_manager/collection_manager/entities/Collection.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/collection_manager/collection_manager/entities/Collection.py
b/collection_manager/collection_manager/entities/Collection.py
index b49ecbb..aa700cd 100644
--- a/collection_manager/collection_manager/entities/Collection.py
+++ b/collection_manager/collection_manager/entities/Collection.py
@@ -41,7 +41,9 @@ class Collection:
raise MissingValueCollectionError(missing_value=e.args[0])
def directory(self):
- if os.path.isdir(self.path):
+ if urlparse(self.path).scheme == 's3':
+ return self.path
+ elif os.path.isdir(self.path):
return self.path
else:
return os.path.dirname(self.path)