Use pathclass.Path.open.
This commit is contained in:
parent
dc98f09f45
commit
753c1cebb5
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ def write(path, content):
|
|||
if path not in writing_rootdir:
|
||||
raise ValueError(path)
|
||||
print(path.absolute_path)
|
||||
f = open(path.absolute_path, 'w', encoding='utf-8')
|
||||
f = path.open('w', encoding='utf-8')
|
||||
f.write(content)
|
||||
f.close()
|
||||
|
||||
|
|
Loading…
Reference in a new issue