def do_didj_mount(self, s): """ Usage: didj_mount Unlock Didj to allow it to mount on host system. """ try: if not self._lm.is_client(self._didj_client): try: mc = conn_iface(mount_connection(self.device_id, self.host_id, self.debug)) self._didj_client = didj_client(mc, self.debug) self._lm.remote_connection_init(mc, fs_iface(local_client(self.debug)), self._didj_client) self._didj_client.mount() self._lm.remote_path_init() self.didj_device_info() except Exception, e: self._didj_client = None self._lm.remote_destroy() self.error(e) else:
def __init__(self, init_path, cmd=None): if cmd is not None: self._cmd = cmd self._prompt_suffix = '> ' self._cmd.prompt = 'local%s' % self._prompt_suffix self.local_client = local_client(False) self.remote_client = None self.remote_conn = None self._remote_set = False self._last_location = self._remote_set self.local_fs = fs_iface(self.local_client) self.remote_fs = None self.fs = self.local_fs self._local_path_init = init_path self.local_path = self._local_path_init self._remote_path_init = '/' self.remote_path = self._remote_path_init self.path = ''