Displaying 2 results from an estimated 2 matches for "847dfac".
Did you mean:
547df5c
2019 Jun 28
0
[PATCH libnbd v3] python: Raise a custom exception containing error string and errno.
...elf.string, self.errno))
+ else:
+ return (\"%%s\" %% self.string)
+Error.__str__ = _str
+
";
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..847dfac
--- /dev/null
+++ b/python/t/610-exception.py
@@ -0,0 +1,32 @@
+# 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...
2019 Jun 28
3
[PATCH libnbd v3] python: Raise a custom exception containing error string and errno.
Following Eric's suggestions from v2, this adds .string, .errno and
.__str__ properties. The .string property returns the error string.
The .errno property returns the errno (from the errno module), or
None. The __str__ property makes the exception nicely printable.
Rich.