[libvirt] [PATCH libvirt-python v2 05/22] event-test.py: Use __file__
Philipp Hahn
hahn at univention.de
Fri Sep 21 13:35:00 UTC 2018
instead of sys.argv[0]
Signed-off-by: Philipp Hahn <hahn at univention.de>
---
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
More information about the libvir-list
mailing list