Skip to content

Commit e6f9a8c

Browse files
author
hfitzp200_comcast
committed
Making big modules 'optional' for Docker
1 parent 5fc04de commit e6f9a8c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

framework/core/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,19 @@
3232

3333
#__all__ = ["testControl", "logModule", "rcCodes", "rackController", "slotInfo" ]
3434
#expose only the components required for the upper classes to operate
35-
from . capture import capture
35+
try:
36+
from . capture import capture
37+
except ImportError:
38+
capture = None # cv2/pytesseract/PIL not installed (e.g. Docker)
3639
from . commonRemote import commonRemoteClass
3740
from . deviceManager import deviceManager
3841
from . logModule import logModule
3942
from . logModule import DEBUG, INFO, WARNING, ERROR, CRITICAL
4043
from . testControl import testController
41-
from . webpageController import webpageController
44+
try:
45+
from . webpageController import webpageController
46+
except ImportError:
47+
webpageController = None # selenium not installed (e.g. Docker)
4248
from . rcCodes import rcCode as rc
4349
from . utilities import utilities
4450

0 commit comments

Comments
 (0)