Can anyone help to understand why the following integer comparison fails
cmd = "adb -s serialid shell getprop sys.boot"
proc = subprocess.Popen(cmd.split(' '), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
outs, errs = proc.communicate()
if outs ==1:
print "Condition met.."
print "Condition fail.."
outs is the stuff that the process prints to standard output. As such, it will be a string, not an int. Since they are different types, the comparison will always fail.
Perhaps your condition should be something like:
if outs.strip() == '1': ...