From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by mx.groups.io with SMTP id smtpd.web12.22926.1662369569476478564 for ; Mon, 05 Sep 2022 02:19:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Le0bnRkx; spf=pass (domain: gmail.com, ip: 209.85.208.180, mailfrom: aladyshev22@gmail.com) Received: by mail-lj1-f180.google.com with SMTP id r27so8165391ljn.0 for ; Mon, 05 Sep 2022 02:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=QMGkH/aWXVfnQrQNZ505AuyAezW2Jrq4f85vGkyS3p8=; b=Le0bnRkx/sj54TfG9OqkBrJGjQBVAefj+3QvsrtsdlnQKjWXiU4yJCge7swHEtD31m YTZnJW80UYngr3yvQf1i9UEbrcWCCDJxtb0M9NRtVDzTV5oM8LCG8ckgCgLxslaY7/fj n4YC5lG5J7ky3MbS8eGoyCdC/mSJCRUsmXmOKjqq9B7pAFWWOPhWvUN0wvq0g1jNi5F1 vFJ8GR+/Ga23QRhGEzqP0SrC2D5NWSNDmwLQCJ6CGmfCOdSdMJzI0EkhACnMZBgAUM2T 2s2CJB5X3z5CiMX3TuZjdtDrP8owTWPE7uxFdwDpAjMVTxMQ8KOUO0rs8coYu1dobxzm ki1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=QMGkH/aWXVfnQrQNZ505AuyAezW2Jrq4f85vGkyS3p8=; b=Gf4gOKn4ajR0pTYQjxi1/nVb1II6p/d7Z5DbUDr7TnjSP+HMhYkxYoznIkM5NmxmZX oJhfLMW+00s2VZSTrmSbannbef0QZL1YaE/UdbrF1lY30wPGq/7t+WnTw5vAHiTAvjBj XhEa1NFF3R/Ah42VuxTDFp7rTeXjtfeWT+jV/5MDA2eDGcIjrRKQ5OSxRlQaX4lNGFXk /0jSsJhVVI2EAOw11C0XxIm4H2LLexsRuqsVnHh3LX3nvKUvYSz24PYYHbpME4+6JLXd xPhzSG8N0EnQ5AxIy+UafzPMPerGw4NLC6zUaFNsuWe+se8IRU+rJLNQuIUb8Sgb3jOB F8pA== X-Gm-Message-State: ACgBeo2nV0FNnYd+Q01nz8g9BS+nPEoW5PJFyXTyhc8qqAoHdqHpjuDd MqwcX4Ox8pCQlxE5M7nY+yFNREZwgWaJjw== X-Google-Smtp-Source: AA6agR7o7Je3HWKRGNwP8PjhukqVOw/2bvI9Hc+wWifysJSvoNDc62BUBl/Y7EMBf4n58xYdzC7E6Q== X-Received: by 2002:a05:651c:91:b0:25e:4418:4c20 with SMTP id 17-20020a05651c009100b0025e44184c20mr14620337ljq.131.1662369567467; Mon, 05 Sep 2022 02:19:27 -0700 (PDT) Return-Path: Received: from PC10319.67 ([82.97.198.254]) by smtp.googlemail.com with ESMTPSA id q25-20020ac24a79000000b004947f8b6266sm1122233lfp.203.2022.09.05.02.19.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Sep 2022 02:19:26 -0700 (PDT) From: "Konstantin Aladyshev" To: devel@edk2.groups.io Cc: bob.c.feng@intel.com, gaoliming@byosoft.com.cn, yuwei.chen@intel.com, Konstantin Aladyshev Subject: [PATCH] BaseTools: Correct BPDG tool error prints Date: Mon, 5 Sep 2022 12:19:23 +0300 Message-Id: <20220905091923.23957-1-aladyshev22@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Popen communication returns bytestrings. It is necessary to perform decode on these strings before passing them to the EdkLogger that works with ordinary strings. Signed-off-by: Konstantin Aladyshev --- BaseTools/Source/Python/Common/VpdInfoFile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/Common/VpdInfoFile.py b/BaseTools/Sour= ce/Python/Common/VpdInfoFile.py index 4249b9f899..1e0c3dfe76 100644 --- a/BaseTools/Source/Python/Common/VpdInfoFile.py +++ b/BaseTools/Source/Python/Common/VpdInfoFile.py @@ -248,8 +248,8 @@ def CallExtenalBPDGTool(ToolPath, VpdFileName): PopenObject.wait()=0D =0D if PopenObject.returncode !=3D 0:=0D - EdkLogger.debug(EdkLogger.DEBUG_1, "Fail to call BPDG tool", str(e= rror))=0D + EdkLogger.debug(EdkLogger.DEBUG_1, "Fail to call BPDG tool", str(e= rror.decode()))=0D EdkLogger.error("BPDG", BuildToolError.COMMAND_FAILURE, "Fail to e= xecute BPDG tool with exit code: %d, the error message is: \n %s" % \=0D - (PopenObject.returncode, str(error)))=0D + (PopenObject.returncode, str(error.decode())))= =0D =0D return PopenObject.returncode=0D --=20 2.25.1