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 <module>
    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
```
This commit is contained in:
Konstantin Akimov 2024-03-01 01:44:33 +07:00 committed by pasta
parent b8395aa4e6
commit 151b56eacd
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984

View File

@ -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')