def start_sync(self): cloud_home = self.ui_config.get('cloud_home') if not cloud_home: log.warning('CoreListener.start_sync: no cloud_home in config, will unlink and shutdown') api.unlink(self.core_client, self.ui_config) Events.shutdown_required.set() else: if not os.path.isdir(cloud_home): log.warning('CoreListener.start_sync: cloud_home was found in config ' 'with value {0} but it is not there'.format(cloud_home)) self.update_state(DaemonState.ROOT_FOLDER_MISSING) else: self.core_client.startSync(cloud_home) self.update_state(DaemonState.AUTHORIZATION_OK)
def start_sync(self): cloud_home = self.ui_config.get('cloud_home') if not cloud_home: log.warning( 'CoreListener.start_sync: no cloud_home in config, will unlink and shutdown' ) api.unlink(self.core_client, self.ui_config) Events.shutdown_required.set() else: if not os.path.isdir(cloud_home): log.warning( 'CoreListener.start_sync: cloud_home was found in config ' 'with value {0} but it is not there'.format(cloud_home)) self.update_state(DaemonState.ROOT_FOLDER_MISSING) else: self.core_client.startSync(cloud_home) self.update_state(DaemonState.AUTHORIZATION_OK)
def unlink(self): log.debug('UIListener.unlink() <<<<') return api.unlink(self.core_client, self.ui_config)