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
|
@ -1,7 +1,10 @@
|
|||
from os.path import join
|
||||
from pathlib import Path
|
||||
|
||||
from bundlewrap.utils import error_context
|
||||
|
||||
groups = {}
|
||||
for group in Path(join(repo_path, "groups")).rglob("*.py"):
|
||||
with error_context(filename=str(group)):
|
||||
with open(group, 'r') as f:
|
||||
exec(f.read())
|
||||
|
|
2
nodes.py
2
nodes.py
|
@ -4,8 +4,10 @@ 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 error_context(filename=str(node)):
|
||||
with open(node, 'r') as f:
|
||||
exec(f.read())
|
||||
|
||||
|
|
Loading…
Reference in a new issue