projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2673: Move auth to headers, avoid combining request body with GET method.
[arvados.git]
/
sdk
/
python
/
arvados
/
collection.py
diff --git
a/sdk/python/arvados/collection.py
b/sdk/python/arvados/collection.py
index b48b6df009dbe26ca970c381b0202472eb26e6fe..fb3dea43acc6872d11ccdbc5456c2d87e5c15c73 100644
(file)
--- a/
sdk/python/arvados/collection.py
+++ b/
sdk/python/arvados/collection.py
@@
-22,6
+22,7
@@
from keep import *
from stream import *
import config
import errors
from stream import *
import config
import errors
+import util
def normalize_stream(s, stream):
stream_tokens = [s]
def normalize_stream(s, stream):
stream_tokens = [s]
@@
-84,12
+85,15
@@
def normalize(collection):
class CollectionReader(object):
def __init__(self, manifest_locator_or_text):
class CollectionReader(object):
def __init__(self, manifest_locator_or_text):
- if re.search(r'^[a-f0-9]{32}
\+\d+(\+\S
)*$', manifest_locator_or_text):
+ if re.search(r'^[a-f0-9]{32}
(\+\d+)?(\+\S+
)*$', manifest_locator_or_text):
self._manifest_locator = manifest_locator_or_text
self._manifest_text = None
self._manifest_locator = manifest_locator_or_text
self._manifest_text = None
- el
se
:
+ el
if re.search(r'^\S+( [a-f0-9]{32,}(\+\S+)*)*( \d+:\d+:\S+)+\n', manifest_locator_or_text)
:
self._manifest_text = manifest_locator_or_text
self._manifest_locator = None
self._manifest_text = manifest_locator_or_text
self._manifest_locator = None
+ else:
+ raise errors.ArgumentError(
+ "Argument to CollectionReader must be a manifest or a collection UUID")
self._streams = None
def __enter__(self):
self._streams = None
def __enter__(self):