str vs utf
This commit is contained in:
1 parent
ae5a1dc6dc
commit
f1673c148f
2 files changed
+2
-2
No files matched your search
@@ -1833,7 +1833,7 @@ def _validate_folder(folder, create=True, check_writable=True, deep_check_writab
|
||||
testfile = os.path.join(folder, ".testballoon.txt")
|
||||
try:
|
||||
with io.open(testfile, 'wt', encoding='utf-8') as f:
|
||||
f.write("test".decode('utf-8'))
|
||||
f.write("test")
|
||||
os.remove(testfile)
|
||||
except Exception:
|
||||
if log_error:
|
||||
|
||||
@@ -337,7 +337,7 @@ class IsHiddenPathTest(unittest.TestCase):
|
||||
for attr in ("path_always_visible", "path_hidden_on_windows", "path_always_hidden"):
|
||||
path = getattr(self, attr)
|
||||
with io.open(path, 'wt+', encoding='utf-8') as f:
|
||||
f.write(attr.decode('utf-8'))
|
||||
f.write(attr)
|
||||
|
||||
if sys.platform == "win32":
|
||||
# we use ctypes and the windows API to set the hidden attribute on the file
|
||||
|
||||
Reference in new issue
Block a user