[ARVADOS] updated: 35ae6cc34dce46c51209696fca3ec4294bb47bfd

git at public.curoverse.com git at public.curoverse.com
Fri Oct 24 21:06:07 EDT 2014


Summary of changes:
 sdk/python/arvados/stream.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

       via  35ae6cc34dce46c51209696fca3ec4294bb47bfd (commit)
      from  42beb8f600402b8d6ee69b0aea100cc7d8feeff3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 35ae6cc34dce46c51209696fca3ec4294bb47bfd
Author: Brett Smith <brett at curoverse.com>
Date:   Fri Oct 24 21:01:16 2014 -0400

    3603: Use endswith since I'm changing these lines anyway.

diff --git a/sdk/python/arvados/stream.py b/sdk/python/arvados/stream.py
index f5b283a..e99f660 100644
--- a/sdk/python/arvados/stream.py
+++ b/sdk/python/arvados/stream.py
@@ -208,11 +208,11 @@ class StreamFileReader(ArvadosFileBase):
     @retry_method
     def readall_decompressed(self, size=2**20, num_retries=None):
         self.seek(0)
-        if re.search('\.bz2$', self.name):
+        if self.name.endswith('.bz2'):
             dc = bz2.BZ2Decompressor()
             return self.decompress(dc.decompress, size,
                                    num_retries=num_retries)
-        elif re.search('\.gz$', self.name):
+        elif self.name.endswith('.gz'):
             dc = zlib.decompressobj(16+zlib.MAX_WBITS)
             return self.decompress(lambda segment: dc.decompress(dc.unconsumed_tail + segment),
                                    size, num_retries=num_retries)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list