Skip to content

Commit 2e53dde

Browse files
committed
ENH: Set self.maestro to an instance of BotMaestroSDK if available for autocomplete.
1 parent f0536bb commit 2e53dde

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

botcity/web/bot.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
from . import config, cv2find
2121
from .browsers import Browser, BROWSER_CONFIGS
2222

23+
24+
try:
25+
from botcity.maestro import BotMaestroSDK
26+
MAESTRO_AVAILABLE = True
27+
except ImportError:
28+
MAESTRO_AVAILABLE = False
29+
30+
2331
logger = logging.getLogger(__name__)
2432

2533

@@ -37,7 +45,7 @@ class WebBot(BaseBot):
3745

3846
def __init__(self, headless=False):
3947
self.state = State()
40-
self.maestro = None
48+
self.maestro = BotMaestroSDK() if MAESTRO_AVAILABLE else None
4149

4250
self._browser = Browser.CHROME
4351
self._options = None

0 commit comments

Comments
 (0)