diff options
| author | Filip Kastl <fkastl@suse.cz> | 2025-06-29 10:16:35 +0200 |
|---|---|---|
| committer | Filip Kastl <fkastl@suse.cz> | 2025-06-29 10:16:35 +0200 |
| commit | 77ac2ca0fe69b4464050c293076b0fe8a32acd05 (patch) | |
| tree | 31c719e6b7321dcb7030b7c338d7510af0736b4c /contrib | |
| parent | 8dcb922452516ebbf362e7c202b48d8ef547edce (diff) | |
contrib/mklog.py: Fix writing to a global variable
The last patch of mklog.py put top-level code into function 'main()'.
Because of this, writing to global variable 'root' has to be preceded by
explicitly declaring 'root' as global. Otherwise the write only has a
local effect.
Without this change, the '-d' cmdline flag would be broken.
Commited as obvious.
contrib/ChangeLog:
* mklog.py: In 'main()', specify variable 'root' as global.
Signed-off-by: Filip Kastl <fkastl@suse.cz>
Diffstat (limited to 'contrib')
| -rwxr-xr-x | contrib/mklog.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/mklog.py b/contrib/mklog.py index 26d4156b034..b841ef0ae97 100755 --- a/contrib/mklog.py +++ b/contrib/mklog.py @@ -389,6 +389,7 @@ def main(): if args.input == '-': args.input = None if args.directory: + global root root = args.directory data = open(args.input, newline='\n') if args.input else sys.stdin |
