Skip to content

Commit

Permalink
fix: uninitialized variable onions in makeseeds script
Browse files Browse the repository at this point in the history
```
$ ./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
```
  • Loading branch information
knst committed Feb 29, 2024
1 parent e008f7f commit 9255a9f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contrib/seeds/makeseeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 9255a9f

Please sign in to comment.