add error_context() to groups.py and nodes.py
This commit is contained in:
parent
bc4f6e507a
commit
39e9ececa2
2 changed files with 9 additions and 4 deletions
6
nodes.py
6
nodes.py
|
@ -4,10 +4,12 @@ from pathlib import Path
|
|||
|
||||
import bwpass
|
||||
from bundlewrap.metadata import atomic
|
||||
from bundlewrap.utils import error_context
|
||||
|
||||
for node in Path(join(repo_path, "nodes")).rglob("*.py"):
|
||||
with open(node, 'r') as f:
|
||||
exec(f.read())
|
||||
with error_context(filename=str(node)):
|
||||
with open(node, 'r') as f:
|
||||
exec(f.read())
|
||||
|
||||
for name, data in nodes.items():
|
||||
data.setdefault('hostname', '.'.join(reversed(name.split('.'))) + '.kunbox.net')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue