|
|
@@ -220,20 +220,19 @@ class Cmdline(object): |
|
|
|
continue |
|
|
|
|
|
|
|
printf("%s %s\n", path, layout) |
|
|
|
if self.args.detail: |
|
|
|
intervals = self.client.stream_intervals( |
|
|
|
path, self.args.start, self.args.end) |
|
|
|
for (start, end) in intervals: |
|
|
|
printf(" [ %s -> %s ]\n", |
|
|
|
self.time_string(start), self.time_string(end)) |
|
|
|
|
|
|
|
def cmd_detail(self): |
|
|
|
"""Detail the ranges available in a particular stream""" |
|
|
|
streams = self.client.stream_list() |
|
|
|
for (path, layout) in streams: |
|
|
|
if (fnmatch.fnmatch(path, self.args.path) and |
|
|
|
fnmatch.fnmatch(layout, self.args.layout)): |
|
|
|
printf("%s %s\n", path, layout) |
|
|
|
if not self.args.detail: |
|
|
|
continue |
|
|
|
|
|
|
|
(intervals, truncated) = self.client.stream_intervals( |
|
|
|
path, self.args.start, self.args.end) |
|
|
|
if not intervals: |
|
|
|
printf(" (no intervals)\n") |
|
|
|
continue |
|
|
|
for (start, end) in intervals: |
|
|
|
printf(" [ %s -> %s ]\n", |
|
|
|
self.time_string(start), self.time_string(end)) |
|
|
|
if truncated: # pragma: no cover (hard to test) |
|
|
|
printf(" (... truncated, more intervals follow)\n") |
|
|
|
|
|
|
|
def cmd_create(self): |
|
|
|
"""Create new stream""" |
|
|
@@ -343,7 +342,7 @@ class Cmdline(object): |
|
|
|
def arg_time(self, toparse): |
|
|
|
"""Parse a time string argument""" |
|
|
|
try: |
|
|
|
return self.parse_time(toparse) |
|
|
|
return self.parse_time(toparse).totimestamp() |
|
|
|
except ValueError as e: |
|
|
|
raise argparse.ArgumentTypeError(sprintf("%s \"%s\"", |
|
|
|
str(e), toparse)) |
|
|
|