I'm getting the error: function' object is unsubscriptable when using the subprocess module with curl command.
cmd (subprocess.check_call ['curl -X POST -u "opt:gggguywqydfydwfh" ' + Url + 'job/%s/%s/promotion/' % (job, Num)]).
I am calling this using the function.
def cmd(sh):
proc = subprocess.Popen(sh, shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE).
Can anyone point out the problem?