instead of sys.argv[0] Signed-off-by: Philipp Hahn <hahn@xxxxxxxxxxxxx> --- examples/event-test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/event-test.py b/examples/event-test.py index 646ce50..ab1da4a 100755 --- a/examples/event-test.py +++ b/examples/event-test.py @@ -667,7 +667,7 @@ def myConnectionCloseCallback(conn, reason, opaque): run = False def usage(): - print("usage: "+os.path.basename(sys.argv[0])+" [-hdl] [uri]") + print("usage: %s [-hdl] [uri]" % (os.path.basename(__file__),)) print(" uri will default to qemu:///system") print(" --help, -h Print this help message") print(" --debug, -d Print debug output") -- 2.11.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list