Commit 2ca445e1 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[cache] CachedDataSource is now an iterable class update its use

parent ad82a8d1
...@@ -113,12 +113,7 @@ def info(config, paths, sizes, index_start, index_end): ...@@ -113,12 +113,7 @@ def info(config, paths, sizes, index_start, index_end):
counter = 0 counter = 0
logger.info(' index:') logger.info(' index:')
while f.hasMoreData(): for data, start, end in f:
try:
data, start, end = f.next()
except Exception as e:
logger.error("Failed to retrieve the next data: %s", e)
return 1
size = len(data.pack()) size = len(data.pack())
counter += size counter += size
...@@ -154,14 +149,7 @@ def view(config, paths, index_start, index_end): ...@@ -154,14 +149,7 @@ def view(config, paths, index_start, index_end):
logger.info(' dataformat: %s', f.dataformat.name) logger.info(' dataformat: %s', f.dataformat.name)
while f.hasMoreData(): for data, start, end in f:
try:
data, start, end = f.next()
except Exception as e:
logger.error("Failed to retrieve the next data: %s", e)
return 1
logger.extra(80 * '-') logger.extra(80 * '-')
if start == end: if start == end:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment