Skip to content

Commit 7714ce3

Browse files
committed
Fix broken commit c9fd0d8.
1 parent c9fd0d8 commit 7714ce3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

amaranth/build/run.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def add_file(self, filename, content):
3333
forward slashes (``/``).
3434
"""
3535
assert isinstance(filename, str) and filename not in self.files
36-
if (pathlib.PurePosixPath(filename).is_absolute or
37-
pathlib.PureWindowsPath(filename).is_absolute):
36+
if (pathlib.PurePosixPath(filename).is_absolute() or
37+
pathlib.PureWindowsPath(filename).is_absolute()):
3838
raise ValueError(f"Filename {filename!r} must not be an absolute path")
3939
self.files[filename] = content
4040

@@ -83,7 +83,7 @@ def execute_local(self, root="build", *, run_script=True, env=None):
8383
filename = pathlib.Path(filename)
8484
# Forbid parent directory components and absolute paths completely to avoid
8585
# the possibility of writing outside the build root.
86-
assert not filename.is_absolute and ".." not in filename.parts
86+
assert not filename.is_absolute() and ".." not in filename.parts
8787
dirname = os.path.dirname(filename)
8888
if dirname:
8989
os.makedirs(dirname, exist_ok=True)

0 commit comments

Comments
 (0)