From dcf78b00979f0e17bb6102069ae33c93045da388 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 10 Mar 2020 09:10:22 +0100 Subject: targets: add __str__ methods to targets Allows to easily get a descriptive string for a target. --- example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'example.py') 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() -- cgit v1.2.3