Add some more str() on Paths…

This commit is contained in:
Emmanuel Gil Peyrot 2018-07-08 09:18:36 +02:00
parent 9dd38bd840
commit fe6c8041a1

View file

@ -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)