Comment 4 for bug 1974475

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nfv (master)

Reviewed: https://review.opendev.org/c/starlingx/nfv/+/843540
Committed: https://opendev.org/starlingx/nfv/commit/37159ae8bd2b6d7e91ebd7c4278ae02609907d4e
Submitter: "Zuul (22348)"
Branch: master

commit 37159ae8bd2b6d7e91ebd7c4278ae02609907d4e
Author: Al Bailey <email address hidden>
Date: Thu May 26 19:14:29 2022 +0000

    Debian: Fix ugly error deleting a patch strategy

    A JSONDecodeError is raised when deleting a patch strategy
    that exists. (the error is not seen if no strategy exists)

    sw-manager patch-strategy delete
    Expecting value: line 1 column 1 (char 0)

    The issue is the JSON decoder does not handle an empty
    string. The empty string is a byte string on debian which
    runs on python3 so the comparison check needed to be
    updated.

    Test Plan:
      Verify that a patch strategy can be deleted on Debian
    without ugly messages.
      Verify that a non existant patch strategy can be deleted
    on Debian without ugly messages.

    Partial-Bug: 1974475
    Signed-off-by: Al Bailey <email address hidden>
    Change-Id: I18f84e20abf43a342e996c4752654bad3261e5a6