Skip to content

Use universal_newlines in subprocess #150

@nettle

Description

@nettle

Describe the task

To make code simpler and more readable we can use universal_newlines=True in subprocess instead of .decode("utf-8")

Scope

  1. Add universal_newlines=True in subprocess call, e.g. 'subprocess.Popen', subprocess.run
  2. Remove output decoding .decode("utf-8")
  3. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions