Skip to content

Commit

Permalink
Merge pull request #47 from merinos/errors
Browse files Browse the repository at this point in the history
proxmoxer/backends/base_ssh.py: add stderr on the Response content
  • Loading branch information
swayf committed Sep 6, 2018
2 parents ff3aac9 + 4ed65f9 commit 9d2cb76
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion proxmoxer/backends/base_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ def request(self, method, url, data=None, params=None, headers=None):
status_code = next(
(int(s.split()[0]) for s in stderr.splitlines() if match(s)),
500)
return Response(stdout, status_code)
if stdout:
return Response(stdout, status_code)
else:
return Response(stderr, status_code)

def upload_file_obj(self, file_obj, remote_path):
raise NotImplementedError()
Expand Down

0 comments on commit 9d2cb76

Please sign in to comment.