When running the application on Debian, now on Python 3 strings are
stored as Byte Strings instead of Unicode Strings. The return of cmd
execution that is stored as a Byte String is problematic for keyring
password saving function, that requires an Unicode string.
This change simply decode the bytes to Unicode, so the plugin is now
compatible with Python 3. By Duck Typing it, the plugin will still be
compatible with Python 2 for ensuring upgrades are still possible.
TEST PLAN:
PASS - Build stx-openstack-helm-fluxcd package
PASS - Run build-helm-charts.sh (build app)
PASS - Upload stx-openstack app on Debian
PASS - Upload stx-openstack app on CentOS
Reviewed: https:/ /review. opendev. org/c/starlingx /openstack- armada- app/+/866045 /opendev. org/starlingx/ openstack- armada- app/commit/ a41e35174fd17df dc1f3bed09ef490 17f00b3a86
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit a41e35174fd17df dc1f3bed09ef490 17f00b3a86
Author: Thales Elero Cervi <email address hidden>
Date: Tue Nov 29 13:28:28 2022 -0300
Decode cmd return string for keyring password
When running the application on Debian, now on Python 3 strings are
stored as Byte Strings instead of Unicode Strings. The return of cmd
execution that is stored as a Byte String is problematic for keyring
password saving function, that requires an Unicode string.
This change simply decode the bytes to Unicode, so the plugin is now
compatible with Python 3. By Duck Typing it, the plugin will still be
compatible with Python 2 for ensuring upgrades are still possible.
TEST PLAN: helm-fluxcd package charts. sh (build app)
PASS - Build stx-openstack-
PASS - Run build-helm-
PASS - Upload stx-openstack app on Debian
PASS - Upload stx-openstack app on CentOS
Closes-Bug: 1998231
Signed-off-by: Thales Elero Cervi <email address hidden> 513e0b7bc57d4c2 2937842587a
Change-Id: Ib28bca757c1946