def __init__(self, loader=None, config=None, client=None):
    self.loader = loader
    self.config = (config or percy.Config())
    self.client = (client or percy.Client(config=self.config))
    self._current_build = None
    self._is_enabled = (os.getenv('PERCY_ENABLE', '1') == '1')
    if self._is_enabled:
        try:
            self.client.config.access_token
        except errors.AuthError:
            if self.client.environment.current_ci:
                utils.print_error('[percy] Warning: Percy is disabled, no PERCY_TOKEN set.')
            self._is_enabled = False
def __init__(self, loader=None, config=None, client=None):
    self.loader = loader
    self.config = (config or percy.Config())
    self.client = (client or percy.Client(config=self.config))
    self._current_build = None
    self._is_enabled = (os.getenv('PERCY_ENABLE', '1') == '1')
    if self._is_enabled:
        try:
            self.client.config.access_token
        except errors.AuthError:
            if self.client.environment.current_ci:
                utils.print_error('[percy] Warning: Percy is disabled, no PERCY_TOKEN set.')
            self._is_enabled = False