From ba818d3cca085050b394dcfd5ae194efb27917d3 Mon Sep 17 00:00:00 2001 From: Bruce Flynn <brucef@ssec.wisc.edu> Date: Tue, 2 Jan 2018 12:52:05 -0600 Subject: [PATCH] fix issue with edosl0info that required -v to see any output --- edosl0util/cli/info.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/edosl0util/cli/info.py b/edosl0util/cli/info.py index ead8aa7..c281506 100644 --- a/edosl0util/cli/info.py +++ b/edosl0util/cli/info.py @@ -1,9 +1,7 @@ import io -import logging -from edosl0util.cli import util -from edosl0util import stream -LOG = logging +from edosl0util import stream +from edosl0util.cli import util def main(): @@ -23,19 +21,18 @@ def main(): packets.next() num_packets += 1 except stream.PacketTooShort as err: - LOG.warn("corrupt packet stream after %d packets: %s", - num_packets, err) + print("corrupt packet stream after %d packets: %s" % (num_packets, err)) break except StopIteration: break total = 0 first, last, info = packets.info() - LOG.info("First: %s", first) - LOG.info("Last: %s", last) + print("First: %s" % first) + print("Last: %s" % last) for apid, dat in info.items(): total += dat['count'] - LOG.info("%d: count=%d missing=%d", apid, dat['count'], dat['num_missing']) - LOG.info("{} total packets".format(total)) + print("%d: count=%d missing=%d", apid, dat['count'], dat['num_missing']) + print("{} total packets".format(total)) if __name__ == '__main__': -- GitLab