mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
tests: Improve bytes python3 compatibility
This commit is contained in:
parent
7aac91f29f
commit
9b690fca57
1 changed files with 1 additions and 1 deletions
|
@ -464,7 +464,7 @@ def mkstemp(data):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
f = tempfile.NamedTemporaryFile(delete=False)
|
f = tempfile.NamedTemporaryFile(delete=False)
|
||||||
f.write(data)
|
f.write(data.encode('utf-8') if not isinstance(data, bytes) else data)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
# Ensure removal at end of python session
|
# Ensure removal at end of python session
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue