diff --git a/avlos/definitions/remote_attribute.py b/avlos/definitions/remote_attribute.py index 37204d2..e56a26f 100644 --- a/avlos/definitions/remote_attribute.py +++ b/avlos/definitions/remote_attribute.py @@ -58,9 +58,14 @@ def set_value(self, __value): def set_value_with_string(self, __str_value): self.set_value(get_registry()(__str_value)) - def str_dump(self): - return "{0} [{1}]: {2:.6g}".format( - self.name, - self.dtype.nickname, - self.get_value(), - ) + def str_dump(self): + value = self.get_value() + if isinstance(value, (int, float)): + format_str = "{0} [{1}]: {2:.6g}" + else: + format_str = "{0} [{1}]: {2}" + return format_str.format( + self.name, + self.dtype.nickname, + value + )