use arg-less main() functions in all scripts

This commit is contained in:
Gilles Boccon-Gibod
2022-10-07 13:56:42 -07:00
parent 2fc7a0bf04
commit d1e119f176
2 changed files with 6 additions and 8 deletions
+2 -2
View File
@@ -90,7 +90,7 @@ class SnoopPacketReader:
@click.command()
@click.option('--format', type=click.Choice(['h4', 'snoop']), default='h4', help='Format of the input file')
@click.argument('filename')
def show(format, filename):
def main(format, filename):
input = open(filename, 'rb')
if format == 'h4':
packet_reader = PacketReader(input)
@@ -117,4 +117,4 @@ def show(format, filename):
# -----------------------------------------------------------------------------
if __name__ == '__main__':
show()
main()