model-checking / cbmc-viewer

CBMC Viewer scans the output of CBMC and produces a browsable summary of its findings, making it easy to root cause the issues it finds.
https://model-checking.github.io/cbmc-viewer/
Apache License 2.0
32 stars 11 forks source link

Use universal_newlines to support older version of Python #123

Closed zhassan-aws closed 2 years ago

zhassan-aws commented 2 years ago

Resolves #122

Description of changes:

Replace the text parameter of Popen with universal_newlines, since text is only available in Python 3.7 and up (the default Python version on Ubuntu 18.04 is 3.6.8). The newer versions of Python still support universal_newlines for backward compatibility:

New in version 3.7: text was added as a more readable alias for universal_newlines.

The universal_newlines argument is equivalent to text and is provided for backwards compatibility.

Source: https://docs.python.org/3/library/subprocess.html#popen-constructor

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.