summaryrefslogtreecommitdiff
path: root/example.py
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-03-10 09:10:22 +0100
committerAnton Khirnov <anton@khirnov.net>2020-03-10 09:11:01 +0100
commitdcf78b00979f0e17bb6102069ae33c93045da388 (patch)
treeb60c2e3d9542f93524de9eac09a45135996ed9ff /example.py
parent00bf9f3eafff6f29b4fcf18d7c1f2ab2b1310c16 (diff)
targets: add __str__ methods to targets
Allows to easily get a descriptive string for a target.
Diffstat (limited to 'example.py')
-rwxr-xr-xexample.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/example.py b/example.py
index 8cd5c31..ba3e09c 100755
--- a/example.py
+++ b/example.py
@@ -14,7 +14,7 @@ tgts = (
def list_targets(tgts):
for tgt in tgts:
- sys.stdout.write('%s\n' % tgt.name)
+ sys.stdout.write('%s\n %s\n' % (tgt.name, str(tgt)))
# parse the commandline
parser = argparse.ArgumentParser()