Describe the task
To make code simpler and more readable we can use universal_newlines=True in subprocess instead of .decode("utf-8")
Scope
- Add
universal_newlines=True in subprocess call, e.g. 'subprocess.Popen', subprocess.run
- Remove output decoding
.decode("utf-8")
- Make sure nothing is broken
Note that we can potentially use text=True which is self-explainable alias,
but universal_newlines is supported from version 3.3 while text is added in 3.7
Definition of Done
- output decoding
.decode("utf-8") is removed
- output is text
- no functionality change (all tests pass)
Describe the task
To make code simpler and more readable we can use
universal_newlines=Trueinsubprocessinstead of.decode("utf-8")Scope
universal_newlines=Trueinsubprocesscall, e.g. 'subprocess.Popen',subprocess.run.decode("utf-8")Note that we can potentially use
text=Truewhich is self-explainable alias,but
universal_newlinesis supported from version 3.3 whiletextis added in 3.7Definition of Done
.decode("utf-8")is removed