[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v20210701 06/40] tools: fix Python3.4 TypeError in format string


  • To: Olaf Hering <olaf@xxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 5 Jul 2021 11:10:18 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xnY+PPET+F2zt6L6l2G5TzAbdbu8ra6zr0Lt9KHC+Ac=; b=VvM9VEoOEC8jcNLIWi2UDMbp/3DBy34kho30+6X5RN6fIxZSCVCiT58vFb5Pn/RUxX/WlRwdMDsYZEoZZUPoKV2FYI7g78KE4EOnzu6Wauby3YGxLH50ah49tCh2G5B1OZYZVrnjGB641F6ca5mNyEiUD5nHOx/ycSsR/VvzNfbAnI2GTdwEFNoGNVtyplOY/JgEKpdyQadt49sbP0WCCR8P4g10T2/v8U81gYmyC+lSbMVCTFVvxGgBJ9v/mhsj5n3qX/5e6awQ5KaEO2PaMu9qx/uGqN6v3wXF3xAD2rH04JAU6SrmiTXtq/A6jJzzHLSquW/zjM0HDEl5zQRY2Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dKp6XM3hGw6Lg36PrNAqUZ9xCiWJgfPqjxzFVOv6fu75SmR8fy1L51MX3K+OkA5sU8vCvFuduag/ALHz0aCKyxIN6fE/H4J7UpHQYMxhAKKig7sN0jCf5lXHzCa1Va/QuY+Bz7CIs++T49YRcESpzzC/c7dHjgGNtcEdL8BNGqPTbAW0XbgFdOY3eV0T6uhktzBFbErbS88ofxhXyKcgMVh0cmsabrmCfjQuiYlz2orTawtDlMEaiU5DanzNdPjSz2q9ftsxzlbPj+uSJsUwsBbf8UUL3fIBtFrDgoJXbn1EW64WyYFnV1OQ2lEUVjDXKgjYZxVV0d8rYpTFOgxPjw==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, "Wei Liu" <wl@xxxxxxx>
  • Delivery-date: Mon, 05 Jul 2021 10:10:34 +0000
  • Ironport-hdrordr: A9a23:yzrV9Kg7zW7k8wHT7fiTPJajiXBQXzd13DAbv31ZSRFFG/FwyP rBoB1L73DJYWgqNE3I+erhBEGBKUmskaKdkrNhQ4tKOzOWx1dATbsSkbcKpgeAJ8SQzJ8n6U 4NSdkZNDS0NykGsS+Y2njLLz9D+qj+zEnAv463pB0BPGIaCdAV0+46MHf9LqQffng0OXNTLu vk2iMonUvERZ1aVLXAOpFTNNKz1+Ej2aiWLiIuNloC0k2jnDmo4Ln1H1yx2QofaSpGxfMH/X LemwL0y62/u7XjoyWsllP73tBzop/M29FDDMuDhow8LSjtsB+hYMBEV6eZtD44jemz4BIBkc XKoT0nI8NvgkmhMF2dkF/I4U3NwTwu43jtxRuzmn34u/H0Qzo8Fo5omZ9ZWgGx0TtjgPhMlI Zwm06JvZteCh3N2A7n4cLTah1snk2o5VI/jO8oiWBFW4d2Us4TkWUmxjIQLH48JlO81Gh+e9 MeSv00pcwmMW9yVkqp+1WGm7eXLy0O9n7seDl2hiSXuwIm1kyRgXFonPD3pU1wgq7VfaM0rN gsAp4Y442mcfVmJJ6VJN1xDPdfWVa9DS4lDgqpUBza/fY8SgPwQtjMke4I2N0=
  • Ironport-sdr: 6pJXLkKwMTQdcKmN/B4CG/qgE5tJoR2os4hOBPbSbLjUYKHlP5oBCMr7gW40+oA767JrP599jj All81qetr3tvfvuBymzUbvlXYcTs1lQ9P9ujP2Evc+J73cvqvxcmJ7tT8EXsisXeNLzYXzhHN+ pG/VcmNSPxCQ/qYdCs8EsAd0rXr9lRixl43b29fiiPc36sudZm+kAdG+xg0hOc3dK147KRmo6q MEYySXnRGcoHDLVov/ICMisVA5PzgqyRZcPxaRH57puOsHDheC2LO8conPj/hLEB5wHvKj1Cjt OuA=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 05/07/2021 09:07, Olaf Hering wrote:
> Am Fri, 2 Jul 2021 18:19:39 +0200
> schrieb Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>:
>
>> Why bytes()? Encode does already return bytes type.
> You are right, this works as well:
>   i = 123
>   b = ("str/%x" % (i, )).encode('utf-8')
>
> Any preference regarding the "encoding"? I picked UTF8, but 'ascii' might be 
> more correct in this context. In practice it may not matter.

I suspect you're right and it doesn't matter, but ascii feels like a
safer option.

~Andrew




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.