diff --git a/okdmr/dmrlib/tools/pcap_tool.py b/okdmr/dmrlib/tools/pcap_tool.py index bf4af6e..479690b 100644 --- a/okdmr/dmrlib/tools/pcap_tool.py +++ b/okdmr/dmrlib/tools/pcap_tool.py @@ -348,19 +348,17 @@ def main( arguments = sys.argv[1:] args = PcapTool._arguments().parse_args(arguments) - return ( - PcapTool.print_pcap( - files=args.files, - ports_whitelist=args.whitelist_ports, - ports_blacklist=args.blacklist_ports, - print_statistics=not args.no_statistics, - callback=EmbeddedExtractor().process_packet - if args.extract_embedded_lc - else PcapTool.debug_packet, - ) - if return_stats - else None + stats = PcapTool.print_pcap( + files=args.files, + ports_whitelist=args.whitelist_ports, + ports_blacklist=args.blacklist_ports, + print_statistics=not args.no_statistics, + callback=EmbeddedExtractor().process_packet + if args.extract_embedded_lc + else PcapTool.debug_packet, ) + if return_stats: + return stats if __name__ == "__main__":