forked from saratov/infra
show reason of proxmoxer exceptions
This commit is contained in:
parent
bbf8824b00
commit
931f23159b
@ -11,6 +11,7 @@ python27.pkgs.buildPythonPackage rec {
|
|||||||
sha256 = "145hvphvlzvwq6sn31ldnin0ii50blsapxz0gv2zx3grzp6x9hvh";
|
sha256 = "145hvphvlzvwq6sn31ldnin0ii50blsapxz0gv2zx3grzp6x9hvh";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [ ./show_reason_on_exceptions.patch ];
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
11
nix/proxmoxer/show_reason_on_exceptions.patch
Normal file
11
nix/proxmoxer/show_reason_on_exceptions.patch
Normal file
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user