From 86ebab2371980ae7e8d4ebbd3455689c1a43022e Mon Sep 17 00:00:00 2001 From: vChavezB <47216966+vChavezB@users.noreply.github.com> Date: Mon, 17 Feb 2020 16:43:18 +0100 Subject: [PATCH] Fixed Export analyzer file name bug Fixed bug which overwrote previous file from analyzers --- saleae_cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/saleae_cli.py b/saleae_cli.py index 9bca8c6..e9de58d 100644 --- a/saleae_cli.py +++ b/saleae_cli.py @@ -52,8 +52,8 @@ def validate_path( path, argument_name ): analyzers = s.get_analyzers() if analyzers.count == 0: print('Warning: analyzer export path was specified, but no analyzers are present in the capture') - for analyzer in analyzers: - file_name = '{0}_{1}.csv'.format(x, analyzer[0]) + for i,analyzer in enumerate(analyzers): + file_name = '{0}_{1}_{2}.csv'.format(x,i, analyzer[0]) save_path = os.path.join(args.export_analyzers, file_name) print('exporting analyzer ' + analyzer[0] + ' to ' + save_path) s.export_analyzer(analyzer[1], save_path)