ranger
ranger copied to clipboard
RANGER-5147: Modernize some Python scripts now that Python 3 is a requirement
What changes were proposed in this pull request?
- in db_setup.py script, there's subprocess.Popen function.
- From python 3, the stdout of Popen instance is byte by default. it means it is not str anymore
- So if you are trying to execute this script, you will see error below
TypeError: a bytes-like object is required, not 'str'
- To avoid this problem, simply just add text=True option in Popen()
How was this patch tested?
- Manually Tested.