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:
Gary Lin
2018-06-25 18:31:27 +08:00
committed by Yonghong Zhu
parent 72443dd250
commit 87d2afd07c
9 changed files with 26 additions and 26 deletions

View File

@ -80,7 +80,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])
@ -103,7 +103,7 @@ if __name__ == '__main__':
#
Process = subprocess.Popen('%s genrsa -out %s 2048' % (OpenSslCommand, Item.name), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
Process.communicate()
if Process.returncode <> 0:
if Process.returncode != 0:
print('ERROR: RSA 2048 key generation failed')
sys.exit(Process.returncode)
@ -125,7 +125,7 @@ if __name__ == '__main__':
#
Process = subprocess.Popen('%s rsa -in %s -modulus -noout' % (OpenSslCommand, Item), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
PublicKeyHexString = Process.communicate()[0].split('=')[1].strip()
if Process.returncode <> 0:
if Process.returncode != 0:
print('ERROR: Unable to extract public key from private key')
sys.exit(Process.returncode)
PublicKey = ''
@ -138,7 +138,7 @@ if __name__ == '__main__':
Process = subprocess.Popen('%s dgst -sha256 -binary' % (OpenSslCommand), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
Process.stdin.write (PublicKey)
PublicKeyHash = PublicKeyHash + Process.communicate()[0]
if Process.returncode <> 0:
if Process.returncode != 0:
print('ERROR: Unable to extract SHA 256 hash of public key')
sys.exit(Process.returncode)