BaseTools: Remove the old python "not-equal"
Replace "<>" with "!=" to be compatible with python3. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
@ -118,7 +118,7 @@ if __name__ == '__main__':
|
||||
sys.exit(1)
|
||||
|
||||
Version = Process.communicate()
|
||||
if Process.returncode <> 0:
|
||||
if Process.returncode != 0:
|
||||
print('ERROR: Open SSL command not available. Please verify PATH or set OPENSSL_PATH')
|
||||
sys.exit(Process.returncode)
|
||||
print(Version[0])
|
||||
@ -208,7 +208,7 @@ if __name__ == '__main__':
|
||||
#
|
||||
Process = subprocess.Popen('%s smime -sign -binary -signer "%s" -outform DER -md sha256 -certfile "%s"' % (OpenSslCommand, args.SignerPrivateCertFileName, args.OtherPublicCertFileName), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
||||
Signature = Process.communicate(input=FullInputFileBuffer)[0]
|
||||
if Process.returncode <> 0:
|
||||
if Process.returncode != 0:
|
||||
sys.exit(Process.returncode)
|
||||
|
||||
#
|
||||
@ -277,7 +277,7 @@ if __name__ == '__main__':
|
||||
#
|
||||
Process = subprocess.Popen('%s smime -verify -inform DER -content %s -CAfile %s' % (OpenSslCommand, args.OutputFileName, args.TrustedPublicCertFileName), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
||||
Process.communicate(input=args.SignatureBuffer)[0]
|
||||
if Process.returncode <> 0:
|
||||
if Process.returncode != 0:
|
||||
print('ERROR: Verification failed')
|
||||
os.remove (args.OutputFileName)
|
||||
sys.exit(Process.returncode)
|
||||
|
Reference in New Issue
Block a user