sonic-buildimage/dockers/docker-database
Myron Sosyak 3bf60b3db2
[docker-database] Fix Python3 issue (#7700)
#### Why I did it
To avoid the following error
```
Traceback (most recent call last):
  File "/usr/local/bin/flush_unused_database", line 10, in <module>
    if 'PONG' in output:
TypeError: a bytes-like object is required, not 'str'
```
`communicate` method returns the strings if streams were opened in text mode; otherwise, bytes.
In our case text arg  in Popen is not true and that means that `communicate` return the bytes
#### How I did it
Set `text=True` to get strings instead of bytes
#### How to verify it
run `/usr/local/bin/flush_unused_database` inside database container
2021-05-31 05:36:24 -07:00
..
base_image_files [monit] Adding patch to enhance syslog error message generation for monit alert action when status is failed. (#5720) 2020-10-31 17:29:49 -07:00
critical_processes [dockers] Update critical_processes file syntax (#4831) 2020-06-25 21:18:21 -07:00
database_config.json.j2 In modular chassis, add CHASSIS_STATE_DB on control card (#5624) 2020-12-15 17:15:00 -08:00
database_global.json.j2 Multi DB with namespace support, Introducing the database_global.json… (#4477) 2020-05-08 21:24:05 -07:00
docker-database-init.sh [docker-base-buster][docker-config-engine-buster] No longer install Python 2 (#6162) 2020-12-25 21:29:25 -08:00
Dockerfile.j2 [MultiDB] add mutidb warmboot support - restoring database (#5773) 2020-12-10 11:06:19 -08:00
flush_unused_database [docker-database] Fix Python3 issue (#7700) 2021-05-31 05:36:24 -07:00
supervisord.conf.j2 [dockers][supervisor] Increase event buffer size for process exit listener; Set all event buffer sizes to 1024 (#7083) 2021-03-27 21:14:24 -07:00