From 931f23159bc008dc3714ffe894c6f99d640143e9 Mon Sep 17 00:00:00 2001 From: Sergey Bubnov Date: Mon, 29 Oct 2018 15:24:46 +0400 Subject: [PATCH] show reason of proxmoxer exceptions --- nix/proxmoxer/default.nix | 1 + nix/proxmoxer/show_reason_on_exceptions.patch | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 nix/proxmoxer/show_reason_on_exceptions.patch diff --git a/nix/proxmoxer/default.nix b/nix/proxmoxer/default.nix index 7ad660e..d312fdc 100644 --- a/nix/proxmoxer/default.nix +++ b/nix/proxmoxer/default.nix @@ -11,6 +11,7 @@ python27.pkgs.buildPythonPackage rec { sha256 = "145hvphvlzvwq6sn31ldnin0ii50blsapxz0gv2zx3grzp6x9hvh"; }; + patches = [ ./show_reason_on_exceptions.patch ]; doCheck = false; meta = { diff --git a/nix/proxmoxer/show_reason_on_exceptions.patch b/nix/proxmoxer/show_reason_on_exceptions.patch new file mode 100644 index 0000000..85cfb08 --- /dev/null +++ b/nix/proxmoxer/show_reason_on_exceptions.patch @@ -0,0 +1,11 @@ +--- a/proxmoxer/core.py 1970-01-01 04:00:01.000000000 +0400 ++++ b/proxmoxer/core.py 2018-10-29 15:21:20.241881023 +0400 +@@ -76,7 +76,7 @@ + + if resp.status_code >= 400: + raise ResourceException("{0} {1}: {2}".format(resp.status_code, httplib.responses[resp.status_code], +- resp.content)) ++ resp.reason)) + elif 200 <= resp.status_code <= 299: + return self._store["serializer"].loads(resp) +