I am trying to convert the below ssh command to python code,I was able to convert to python but the python code doesnt give any output,so i think i did not convert it properly especially the boolean "AND" logic..can anyone point what is wrong here?
ssh -p 29418 company.com gerrit query --current-patch-set --commit-message --files 'status:open project:platform/code branch:master label:Developer-Verified=1 AND label:Code-Review>=1'
Python code:-
with open(timedir + "/ids.txt", "wb") as file:
check_call("ssh -p 29418 company.com "
"gerrit query --commit-message --files --current-patch-set "
"status:open project:platform/code branch:master label:Developer-Verified=1 AND label:Code-Review>=1 |"
"grep refs |"
"cut -f4 -d'/'",
shell=True, # need shell due to the pipes
stdout=file) # redirect to a file