search for: c7edf37

Displaying 2 results from an estimated 2 matches for "c7edf37".

Did you mean: 2c7e0f37
2019 Jun 28
3
[PATCH libnbd v2] python: Raise a custom exception containing error string and errno.
This kind of fixes the problems in v1. The exception still primarily lives in the libnbdmod and you could still refer to it using libnbdmod.Error (but don't do that). However when the exception is printed it now appears as nbd.Error, and you can catch it also using the same name. Other problems: - There is no "nice" interface to accessing the exception fields. You have to use
2019 Jun 28
0
[PATCH libnbd v2] python: Raise a custom exception containing error string and errno.
...to use the API. import libnbdmod +# Reexport Error exception as nbd.Error +from libnbdmod import Error + "; List.iter (fun (n, i) -> pr "%-30s = %d\n" n i) constants; diff --git a/python/t/610-exception.py b/python/t/610-exception.py new file mode 100644 index 0000000..c7edf37 --- /dev/null +++ b/python/t/610-exception.py @@ -0,0 +1,33 @@ +# libnbd Python bindings +# Copyright (C) 2010-2019 Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Fo...