Skip to content

Commit

Permalink
ENH: Set self.maestro to an instance of BotMaestroSDK if available fo…
Browse files Browse the repository at this point in the history
…r autocomplete.
  • Loading branch information
hhslepicka committed Aug 31, 2021
1 parent f0536bb commit 2e53dde
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion botcity/web/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
from . import config, cv2find
from .browsers import Browser, BROWSER_CONFIGS


try:
from botcity.maestro import BotMaestroSDK
MAESTRO_AVAILABLE = True
except ImportError:
MAESTRO_AVAILABLE = False


logger = logging.getLogger(__name__)


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

def __init__(self, headless=False):
self.state = State()
self.maestro = None
self.maestro = BotMaestroSDK() if MAESTRO_AVAILABLE else None

self._browser = Browser.CHROME
self._options = None
Expand Down

0 comments on commit 2e53dde

Please sign in to comment.