Richard W.M. Jones bbf396fc55 python: Use bytes instead of str for event callback buffer
The event callback gets a buffer parameter which is usually something
like a log message.  However as it comes from C it is not necessarily
well-formed (eg) UTF-8 but could contain any old sequence of bytes.

In the test case provided by the reporter, we failed to encode the
buffer as 'str' with this error:

  UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 137: unexpected end of data

Use 'bytes' instead.  Strictly speaking this changes the type
signature of the callbacks, but our existing Python tests which just
print the buffer using '%s' don't fail and in any case we don't
guarantee the stability of non-C APIs.

Reported-by: Yonatan Shtarkman
See: https://listman.redhat.com/archives/libguestfs/2023-February/030653.html
2023-02-14 19:29:48 +00:00
2023-02-07 13:30:35 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 11:23:45 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2021-04-09 14:27:11 +01:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-10 11:09:55 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2018-02-22 15:06:13 +00:00
2021-04-08 11:36:40 +01:00
2022-05-18 16:03:18 +01:00
2013-01-24 15:00:49 +00:00
2020-01-14 16:21:22 +01:00
2023-02-10 11:09:55 +00:00
2019-11-13 12:49:55 +00:00
2023-02-07 10:50:48 +00:00
2023-02-07 10:50:48 +00:00
2023-02-10 11:09:55 +00:00
2023-02-07 10:50:48 +00:00

Libguestfs is tools and a library for accessing and modifying guest
disk images.  For more information see the home page:

  http://libguestfs.org/

For discussion, development, patches, etc. please use the mailing
list:

  http://www.redhat.com/mailman/listinfo/libguestfs

To find out how to build libguestfs from source, read:

  docs/guestfs-building.pod
  http://libguestfs.org/guestfs-building.1.html
  man docs/guestfs-building.1

Copyright (C) 2009-2023 Red Hat Inc.

The library is distributed under the LGPLv2+.  The programs are
distributed under the GPLv2+.  Please see the files COPYING and
COPYING.LIB for full license information.  The examples are under a
very liberal license.
Languages
C 42.7%
OCaml 35.5%
Shell 7.1%
Makefile 4%
Perl 2.6%
Other 8%