ranger icon indicating copy to clipboard operation
ranger copied to clipboard

RANGER-5147: Modernize some Python scripts now that Python 3 is a requirement

Open HalimKim opened this issue 4 months ago • 0 comments

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.

HalimKim avatar Aug 21 '25 01:08 HalimKim