cadyderwin commited on
Commit
9f71fc7
·
verified ·
1 Parent(s): b40d266

Update app.py

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