(self, secret)
Display the HTML files referenced by the given secret in the View.
        If the secret is not synced locally, it will be initialized and synced.

        Parameters
        ----------
        secret : str
            BTSync secret string

        Raises
        ------
        RuntimeError if `secret` is invalid
Display the HTML files referenced by the given secret in the View.
        If the secret is not synced locally, it will be initialized and synced.
Display the HTML files referenced by the given secret in the View . If the secret is not synced locally it will be initialized and synced .
def load_secret(self, secret):
        """ Display the HTML files referenced by the given secret in the View.
        If the secret is not synced locally, it will be initialized and synced.

        Parameters
        ----------
        secret : str
            BTSync secret string

        Raises
        ------
        RuntimeError if `secret` is invalid

        """
        secret = secret.upper()
        if not self.is_valid_secret(secret):
            msg = 'Attempted to load invalid secret: {}'.format(secret)
            raise RuntimeError(msg)

        if secret not in self.known_secrets:
            self.init_secret(secret)

        # Store the currently loaded secret so its directory can be monitored.
        self.current_secret = secret

        # Ensure the HTTP server is running before the url is set.
        if self._server_thread is None:
            logger.debug('Creating server thread')
            self._server_thread = self._create_server_thread()

        url = 'http://localhost:{}/{}'.format(self.http_port, secret)
        self.url = ''  # FIXME hack to get the webview to reload
        self.url = url
        logger.debug('URL set to: {}'.format(url))
def load_secret ( self , secret ) : secret = secret . upper ( ) if not self . is_valid_secret ( secret ) : msg = 'Attempted to load invalid secret: {}' . format ( secret ) raise RuntimeError ( msg ) if secret not in self . known_secrets : self . init_secret ( secret ) # Store the currently loaded secret so its directory can be monitored. self . current_secret = secret # Ensure the HTTP server is running before the url is set. if self . _server_thread is None : logger . debug ( 'Creating server thread' ) self . _server_thread = self . _create_server_thread ( ) url = 'http://localhost:{}/{}' . format ( self . http_port , secret ) self . url = '' # FIXME hack to get the webview to reload self . url = url logger . debug ( 'URL set to: {}' . format ( url ) )