Add some more str() on Paths…
This commit is contained in:
parent
9dd38bd840
commit
fe6c8041a1
1 changed files with 2 additions and 2 deletions
|
@ -341,7 +341,7 @@ class Config(RawConfigParser):
|
||||||
filename = self.file_name.parent / ('.%s.tmp' % self.file_name.name)
|
filename = self.file_name.parent / ('.%s.tmp' % self.file_name.name)
|
||||||
with os.fdopen(
|
with os.fdopen(
|
||||||
os.open(
|
os.open(
|
||||||
filename,
|
str(filename),
|
||||||
os.O_WRONLY | os.O_CREAT,
|
os.O_WRONLY | os.O_CREAT,
|
||||||
0o600,
|
0o600,
|
||||||
),
|
),
|
||||||
|
@ -500,7 +500,7 @@ def file_ok(filepath):
|
||||||
False otherwise.
|
False otherwise.
|
||||||
"""
|
"""
|
||||||
val = filepath.exists()
|
val = filepath.exists()
|
||||||
val &= os.access(filepath, os.R_OK | os.W_OK)
|
val &= os.access(str(filepath), os.R_OK | os.W_OK)
|
||||||
return bool(val)
|
return bool(val)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue