Esempio n. 1
0
    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
Esempio n. 2
0
    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
Esempio n. 3
0
    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
Esempio n. 4
0
    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
Esempio n. 5
0
 def serialize(self, *args, **kwargs):
     kwargs = SardanaBaseObject.serialize(self, *args, **kwargs)
     kwargs["pool"] = self.pool.name
     return kwargs
Esempio n. 6
0
 def serialize(self, *args, **kwargs):
     kwargs = SardanaBaseObject.serialize(self, *args, **kwargs)
     kwargs['macro_server'] = self.macro_server.name
     return kwargs
Esempio n. 7
0
 def serialize(self, *args, **kwargs):
     kwargs = SardanaBaseObject.serialize(self, *args, **kwargs)
     kwargs['macro_server'] = self.macro_server.name
     return kwargs
Esempio n. 8
0
 def serialize(self, *args, **kwargs):
     kwargs = SardanaBaseObject.serialize(self, *args, **kwargs)
     kwargs['pool'] = self.pool.name
     return kwargs