Skip to content

Commit 10be7e9

Browse files
authored
Merge pull request #22 from Arenatdk/fix-pipeline-toml
Fix linux pipeline.
2 parents df93fea + 0b8fe4f commit 10be7e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

patch_python_package.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def patch_file(file_path: str, patched_tree: ast.AST) -> None:
1616
f.write(f"version = '{patchright_version}'")
1717

1818
# Patching pyproject.toml
19-
with open("playwright-python/pyproject.toml", "r+") as f:
19+
with open("playwright-python/pyproject.toml", "r") as f:
2020
pyproject_source = toml.load(f)
2121

2222
pyproject_source["project"]["name"] = "patchright"
@@ -35,8 +35,8 @@ def patch_file(file_path: str, patched_tree: ast.AST) -> None:
3535
pyproject_source["tool"]["setuptools"]["packages"] = ['patchright', 'patchright.async_api', 'patchright.sync_api', 'patchright._impl', 'patchright._impl.__pyinstaller']
3636
pyproject_source["tool"]["setuptools_scm"] = {'version_file': 'patchright/_repo_version.py'}
3737

38-
f.seek(0)
39-
toml.dump(pyproject_source, f)
38+
with open("playwright-python/pyproject.toml", "w") as f:
39+
toml.dump(pyproject_source, f)
4040

4141

4242
# Patching setup.py

0 commit comments

Comments
 (0)