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

Re: [XTF PATCH] xtf-runner: python3 fix


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 18 Aug 2023 20:50:37 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IDzqrjw1YhNXByOxtuYV1M2FaVATqHIsBauoC8lELjo=; b=AfuopdjwSawbH5IaSmeu1IfxZ2cMXFH78JGKmnfPt1UZPhcsfzVpqCI2LRF3NoG7EeIHJW/m/JtrgCyXecsYMz9Jpww5aOcoeOOOT/CujkTJI2qMVKv2sNcOswjaBs6uIRXmK52aEV5Yl9SSU+m08lih3nQHfMqtDhY57z4FeA0wQgP4XYTGfTy7wvElJbEtTdj7u2iL/JlPGpLrm9LPbT5VFG2iuGY+kwIOm19yYZn1+ZzCRS3a9JRw3IAsOy0FN9WqValn7mGBLZnlQEUnlQJBszjBujcjVoMlqd0m4oguDTm+xatyqlcfe78PZKCt4H2xryAbHwPx7k3zW2McRA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TAa8Ri162LFB0g0OcsYJoIlqay7QDQiYlu3Z46K/F++stTUCKZSKdTU2XGF0KMJHkuycVUES/nu4aSfsZAFkZxI6RNzf+9gV6sUlj+fY718BdNiTwxjFH+LJ7o9cPiR4OerAYpwNCTJwlCk8/ngUjxhjlrgZiJoKJhUVa/fRRe7bpzwJ4O2uCvCS9kNYyJR99zcBt7FlxzhJORAiwjytIibJaa0DnbKXXJA2jSKHd0h8O5EM7POy5KZ99VODQJJnLPM8erRJitEFvpc3KZjmMYXcqC+t4qnbumV9vrOLYeUlfIF7EpANP/C2PIkU8DMVMsG3YWJuqjcI6nijI/vFMQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Delivery-date: Fri, 18 Aug 2023 19:50:56 +0000
  • Ironport-data: A9a23:kKNN1K49rejAyAqcjZr/EwxRtDTGchMFZxGqfqrLsTDasY5as4F+v jYeUGHSb6zfN2fxftB1O97koR8Ev8CDm4AwTQY/qyg0Hi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraCYnsrLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9lU35ZwehBtC5gZlPaAS7AeC/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5m7 tZHOQ4PcC+/tu+H4J+pE+5VvOB6FZy+VG8fkikIITDxK98DGMqGaYOaoNhS0XE3m9xEGuvYa 4wBcz1zYR/cYhpJfFAKFJY5m+TujX76G9FagAvN+exrvC6OkUooj+GF3Nn9I7RmQe18mEqCq 32A1GP+GhwAb/SUyCaf82LqjejK9c/+cNtLRezlrKIy2TV/wEQSFBIsc3GSv8DpoRKFGPd6B lwP9w8h+P1aGEuDC4OVsweDiG6JuFsQVsRdF8U+6RqR0ezE7gCBHG8GQzVdLts8u6cLqScC0 1aIm5bjA2xpubjME3aFrO7L9HW1JDQfKnIEaWkcVwwZ7tL/oYY1yBXSUtJkF63zhdrwcd3t/ w23QOEFr+17paY2O2+TpDgrXxrESkD1czMI
  • Ironport-hdrordr: A9a23:U/OopKPoElRVr8BcTuOjsMiBIKoaSvp037BL7TEVdfUxSKb0qy nAppgmPHPP5wr5IUtQ/uxoW5PwI080l6QU3WB5B97LYOCBggWVxepZnOjfKlPbehEWwdQtsZ uII5IUNDQpNykBsS8h2njBLz/8+qjgzEl1v5ak856yd3AWV0kOhz0JczqmLg==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17/08/2023 11:51 am, Anthony PERARD wrote:
> issue:
>   File "/home/xtf/xtf-runner", line 410, in interpret_selection
>     if not line.startswith("xen_caps"):
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> TypeError: startswith first arg must be bytes or a tuple of bytes, not str
>
> Adding `universal_newlines` open stdout as text file, so line should
> be a `str`. `universal_newlines` is available on python 2.7. A new
> alias `text` is only available in python 3.7.
>
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> ---
>
> Notes:
>     I've only tested the patch on Debian Bookworm, with python-is-python3
>     package (python symlink) as osstest run `./xtf-runner ...`.
>     
>     I haven't tried python2.7.

Seems to work on Py2.7.

Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> and pushed.  Thanks.



 


Rackspace

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