mirror of
https://github.com/proxmoxer/proxmoxer.git
synced 2026-04-25 07:06:00 +03:00
[GH-ISSUE #89] When using backend openssh agent.exec.post(command="ls") works, "ls -l" says TypeError: cannot use a string pattern on a bytes-like object #49
Labels
No labels
backend:https
backend:local
backend:openssh
backend:ssh_paramiko
pull-request
status:ansible-issue
status:help-wanted
status:info-needed
status:proxmox-issue
status:review-needed
type:bug 🐞
type:dependency ⛓️
type:docs 📝
type:enhancement ⏫
type:maintenance 🛠️
type:meta
type:question ❓
type:request ✋
type:testing 🧪
version:1.x
version:latest
version:py2
version:py3
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmoxer#49
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @guerby on GitHub (Feb 25, 2022).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/89
Originally assigned to: @jhollowe on GitHub.
Hi,
When connecting to a server with openssh backend I can exec a command "ls" via the agent successfully:
But when I try "ls -l" I get TypeError: cannot use a string pattern on a bytes-like object :
When I use the https backend both "ls" and "ls -l" work. I suspect an issue with space handling/quoting or may be I missed something for post command=.
Thanks for proxmoxer!
@jhollowe commented on GitHub (Mar 10, 2022):
There were two issues: the error got returned as a byte string and so the code (seen in the stack trace above) died when trying to parse it for the error. Second, the command was not handled any different from all the other parameters and the SSH/CLI based backends need special handling for it (https needs special work too, it just wasn't as obvious it was broken).
I have initial fixes that I still need to add tests for and finalize if how I'm currently doing it is the best way. I also need to make sure this fix will not break any other API endpoints in PVE, PMS, or PBS.