def serialize(self, *args, **kwargs): """Returns a serializable object describing this object. :return: a serializable dict :rtype: dict""" kwargs = SardanaBaseObject.serialize(self, *args, **kwargs) kwargs['id'] = 0 kwargs['module'] = self.module_name kwargs['file_name'] = self.file_name kwargs['file_path'] = self.file_path kwargs['path'] = self.path kwargs['description'] = self.description return kwargs
def serialize(self, *args, **kwargs): """Returns a serializable object describing this object. :return: a serializable dict :rtype: dict""" kwargs = SardanaBaseObject.serialize(self, *args, **kwargs) kwargs['id'] = 0 kwargs['module'] = self.name kwargs['file_path'] = self.file_path kwargs['file_name'] = self.file_name kwargs['path'] = self.path kwargs['description'] = self.description kwargs['elements'] = self.meta_classes.keys() + self.meta_functions.keys() if self.exc_info is None: kwargs['exc_summary'] = None kwargs['exc_info'] = None else: kwargs['exc_summary'] = "".join(traceback.format_exception_only(*self.exc_info[:2])) kwargs['exc_info'] = "".join(traceback.format_exception(*self.exc_info)) return kwargs
def serialize(self, *args, **kwargs): """Returns a serializable object describing this object. :return: a serializable dict :rtype: dict""" kwargs = SardanaBaseObject.serialize(self, *args, **kwargs) kwargs['id'] = 0 kwargs['module'] = self.name kwargs['file_path'] = self.file_path kwargs['file_name'] = self.file_name kwargs['path'] = self.path kwargs['description'] = self.description kwargs['elements'] = list(self.meta_classes.keys()) + \ list(self.meta_functions.keys()) if self.exc_info is None: kwargs['exc_summary'] = None kwargs['exc_info'] = None else: kwargs['exc_summary'] = "".join( traceback.format_exception_only(*self.exc_info[:2])) kwargs['exc_info'] = "".join( traceback.format_exception(*self.exc_info)) return kwargs
def serialize(self, *args, **kwargs): kwargs = SardanaBaseObject.serialize(self, *args, **kwargs) kwargs["pool"] = self.pool.name return kwargs
def serialize(self, *args, **kwargs): kwargs = SardanaBaseObject.serialize(self, *args, **kwargs) kwargs['macro_server'] = self.macro_server.name return kwargs
def serialize(self, *args, **kwargs): kwargs = SardanaBaseObject.serialize(self, *args, **kwargs) kwargs['pool'] = self.pool.name return kwargs