def on_source_data_downloaded(self, widget): path = widget.get_downloaded_file() tarfile = utdata.create_tarfile(path) if tarfile.is_valid(): tarfile.extract(consts.CONFIG_ROOT) self.update_source_data() utdata.save_synced_timestamp(SOURCE_ROOT) self.update_timestamp() else: ErrorDialog(_('An error occurred whilst downloading the file')).launch()
def on_source_data_downloaded(self, widget): path = widget.get_downloaded_file() tarfile = utdata.create_tarfile(path) if tarfile.is_valid(): tarfile.extract(consts.CONFIG_ROOT) self.update_source_data() utdata.save_synced_timestamp(SOURCE_ROOT) self.update_timestamp() else: ErrorDialog( _('An error occurred whilst downloading the file')).launch()
def on_app_data_downloaded(self, widget): log.debug("on_app_data_downloaded") path = widget.get_downloaded_file() tarfile = utdata.create_tarfile(path) if tarfile.is_valid(): tarfile.extract(consts.CONFIG_ROOT) self.update_app_data() utdata.save_synced_timestamp(APPCENTER_ROOT) self.update_timestamp() else: ErrorDialog(_('An error occurred while downloading the file.')).launch()