Accept empty string as root stream name "." in
authorTom Clegg <tom@clinicalfuture.com>
Fri, 29 Nov 2013 16:36:04 +0000 (08:36 -0800)
committerTom Clegg <tom@clinicalfuture.com>
Tue, 3 Dec 2013 22:33:02 +0000 (14:33 -0800)
arvados.CollectionWriter, to mirror os.path.split()

sdk/python/arvados.py

index 354ef629f8641d27f20935c4b57de0df5808520c..75e99d234560cdedc1e51b3cade3f506e8330fa5 100644 (file)
@@ -753,7 +753,7 @@ class CollectionWriter(object):
     def set_current_stream_name(self, newstreamname):
         if re.search(r'[ \t\n]', newstreamname):
             raise AssertionError("Manifest stream names cannot contain whitespace")
-        self._current_stream_name = newstreamname
+        self._current_stream_name = '.' if newstreamname=='' else newstreamname
     def current_stream_name(self):
         return self._current_stream_name
     def finish_current_stream(self):