Skip to content

Commit ca19e34

Browse files
authored
wrong if statement (#19)
fix: wrong if statement
1 parent 34e3019 commit ca19e34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ When loading it back, we can use the code below:
9494
with open('licensefile.skm', 'r') as f:
9595
license_key = LicenseKey.load_from_string(pubKey, f.read())
9696

97-
if license_key != None not Helpers.IsOnRightMachine(license_key):
97+
if license_key == None or not Helpers.IsOnRightMachine(license_key):
9898
print("NOTE: This license file does not belong to this machine.")
9999
else:
100100
print("Feature 1: " + str(license_key.f1))
@@ -108,7 +108,7 @@ If you want to make sure that the license file is not too old, you can specify t
108108
with open('licensefile.skm', 'r') as f:
109109
license_key = LicenseKey.load_from_string(pubKey, f.read(), 30)
110110

111-
if license_key != None not Helpers.IsOnRightMachine(license_key):
111+
if license_key == None or not Helpers.IsOnRightMachine(license_key):
112112
print("NOTE: This license file does not belong to this machine.")
113113
else:
114114
print("Feature 1: " + str(license_key.f1))

0 commit comments

Comments
 (0)