def __repr__(self):
        if not isinstance(self.precision, (int, long)):
            log = logging.getLogger('diamond')
            log.warn('Metric %s does not have a valid precision', self.path)
            self.precision = 0

        # Set the format string
        fstring = "%%s %%0.%if %%i\n" % self.precision

        # Return formated string
        return fstring % (self.path, self.value, self.timestamp)
Checks if the specified device uses LUKS for encryption.
dataset/ETHPy150Open python-diamond/Diamond/src/diamond/metric.py/Metric.__repr__--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/volume/encryptors/luks.py/is_luks