cadyderwin commited on
Commit
865c0ce
·
verified ·
1 Parent(s): 6018134

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -15,14 +15,15 @@ from opyidlive import initSDK
15
  from opyidlive import processImage
16
 
17
  licenseKeyPath = "license.txt"
18
- license = ""
19
-
20
- try:
21
- with open(licenseKeyPath, 'r') as file:
22
- license = file.read().strip()
23
- except IOError as exc:
24
- print("failed to open license.txt: ", exc.errno)
25
- print("License Key: ", license)
 
26
 
27
  hwid = getHWID()
28
  print("HWID: ", hwid.decode('utf-8'))
 
15
  from opyidlive import processImage
16
 
17
  licenseKeyPath = "license.txt"
18
+ license = os.environ.get("LICENSE_KEY")
19
+
20
+ if license is None:
21
+ try:
22
+ with open(licenseKeyPath, 'r') as file:
23
+ license = file.read().strip()
24
+ except IOError as exc:
25
+ print("failed to open license.txt: ", exc.errno)
26
+ print("License Key: ", license)
27
 
28
  hwid = getHWID()
29
  print("HWID: ", hwid.decode('utf-8'))