From 0ffb940747ce03ee92bc9bceb81e9953bf3b6913 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 9 Jan 2025 23:14:28 +0100 Subject: [PATCH] Update bro.py: Fix undefined name in Python code `outfile` is used before it is defined on the following line so use `options.outfile` instead. % `ruff check` ``` Error: python/bro.py:168:64: F821 Undefined name `outfile` ``` --- python/bro.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/bro.py b/python/bro.py index f0adf5c0..a624d3f5 100755 --- a/python/bro.py +++ b/python/bro.py @@ -165,7 +165,7 @@ def main(args=None): # redirect the write according to symlink. if os.path.exists(options.outfile) and not options.force: parser.error(('Target --outfile=%s already exists, ' - 'but --force was not requested.') % (outfile,)) + 'but --force was not requested.') % (options.outfile,)) outfile = open(options.outfile, 'wb') did_open_outfile = True else: