Exemple #1
0
 def cached_sdict(self):
     status = self.sdict()
     try:
         validate_statedict(status)
     except ValueError as e:
         raise ValueError(
             _("{item} from bundle '{bundle}' returned invalid status: {msg}"
               ).format(
                   bundle=self.bundle.name,
                   item=self.id,
                   msg=repr(e),
               ))
     return status
Exemple #2
0
 def cached_sdict(self):
     status = self.sdict()
     try:
         validate_statedict(status)
     except ValueError as e:
         raise ValueError(_(
             "{item} from bundle '{bundle}' returned invalid status: {msg}"
         ).format(
             bundle=self.bundle.name,
             item=self.id,
             msg=repr(e),
         ))
     return status
Exemple #3
0
    def cached_cdict(self):
        if self._faults_missing_for_attributes:
            self._raise_for_faults()

        cdict = self.cdict()
        try:
            validate_statedict(cdict)
        except ValueError as e:
            raise ValueError(
                _("{item} from bundle '{bundle}' returned invalid cdict: {msg}"
                  ).format(
                      bundle=self.bundle.name,
                      item=self.id,
                      msg=repr(e),
                  ))
        return cdict
Exemple #4
0
    def cached_cdict(self):
        if self._faults_missing_for_attributes:
            self._raise_for_faults()

        cdict = self.cdict()
        try:
            validate_statedict(cdict)
        except ValueError as e:
            raise ValueError(_(
                "{item} from bundle '{bundle}' returned invalid cdict: {msg}"
            ).format(
                bundle=self.bundle.name,
                item=self.id,
                msg=repr(e),
            ))
        return cdict