From d14aead7f847e849d5439d2a0905d2ac1e406261 Mon Sep 17 00:00:00 2001 From: Yashas Kumar Date: Sun, 27 Sep 2015 17:22:06 -0400 Subject: [PATCH] Display objects correctly as strings in log --- tangoObjects.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tangoObjects.py b/tangoObjects.py index 5d2c6d2c..25162409 100644 --- a/tangoObjects.py +++ b/tangoObjects.py @@ -30,6 +30,10 @@ def __init__(self, localFile, destFile): self.localFile = localFile self.destFile = destFile + def __repr__(self): + return "InputFile(localFile: %s, destFile: %s)" % (self.localFile, + self.destFile) + class TangoMachine(): @@ -54,6 +58,9 @@ def __init__(self, name="DefaultTestVM", image=None, vmms=None, self.id = id self.instance_id = id + def __repr__(self): + return "TangoMachine(image: %s, vmms: %s)" % (self.image, self.vmms) + class TangoJob():