I am trying to pass variables to call method (subprocess) as below:
def check(number):
nodes = ["10.0.0.1","10.0.0.2"]
nr=number
for node in nodes:
output=call(["ssh","-F","/home/config","user@",_node,","some_command",_nr])
print output
The error when this function "check" is called is below:
NameError: global name '_node' is not defined
Can you please help me?