def run_single_cycle(self):
        self._timestamp = int(time.time())

        # There are certain error conditions, such as the system not supporting
        # a particular proc file type, that we will never recover from.  So,
        # just always early exit.
        if self._failed:
            return

        filename = self._file_pattern % self._pid

        if self._file is None:
            try:
                self._file = open(filename, "r")
            except IOError, e:
                # We take a simple approach.  If we don't find the file or
                # don't have permissions for it, then just don't collect this
                # stat from now on.  If the user changes the configuration file
                # we will try again to read the file then.
                if e.errno == 13:
                    self._logger.error("The agent does not have permission to read %s.  "
                                       "Maybe you should run it as root.", filename)
                    self._failed = True
                elif e.errno == 2:
                    self._logger.error("The agent cannot read %s.  Your system may not support that proc file type",
                                       filename)
                    self._failed = True
                else:
                    raise e

        if self._file is not None:
            self._file.seek(0)
            self.gather_sample(self._file)
Catch decimal's exception and raise the one objectify expects
dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/builtin_monitors/linux_process_metrics.py/BaseReader.run_single_cycle--crossover with--dataset/ETHPy150Open freshbooks/refreshbooks/refreshbooks/api.py/check_decimal_element