From 151b56eacda309c676524bab01d40140b7d08202 Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Fri, 1 Mar 2024 01:44:33 +0700 Subject: [PATCH] fix: uninitialized variable onions in makeseeds script ``` $ ./makeseeds.py protx.txt > nodes_main.txt Traceback (most recent call last): File "DASH/contrib/seeds/./makeseeds.py", line 183, in main() File "DASH/contrib/seeds/./makeseeds.py", line 167, in main for onion in onions: ^^^^^^ UnboundLocalError: cannot access local variable 'onions' where it is not associated with a value ``` --- contrib/seeds/makeseeds.py | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py index 331065fb32..314fb6ea16 100755 --- a/contrib/seeds/makeseeds.py +++ b/contrib/seeds/makeseeds.py @@ -150,6 +150,7 @@ def main(): else: mns = json.load(sys.stdin) + onions = [] if len(sys.argv) > 2: with open(sys.argv[2], 'r', encoding="utf8") as f: onions = f.read().split('\n')