diff --git a/tools/pusb_adm b/tools/pusb_adm index 957481f..e8f5fe8 100755 --- a/tools/pusb_adm +++ b/tools/pusb_adm @@ -18,6 +18,7 @@ import dbus import sys +import os from xml.dom import minidom class Device: @@ -134,7 +135,7 @@ def addDevice(options): print 'Done.' def usage(): - print 'Usage: %s [--config file] --add-device [--no-autodetect]' % sys.argv[0] + print 'Usage: %s [--config file] --add-device [--no-autodetect]' % os.path.basename(__file__) sys.exit(1) import getopt diff --git a/tools/pusb_hotplug b/tools/pusb_hotplug index 10dff3c..eaec17c 100755 --- a/tools/pusb_hotplug +++ b/tools/pusb_hotplug @@ -102,8 +102,8 @@ class Log: syslog.syslog(priority, message) def usage(): - print 'Usage: %s [--config file] [--daemon] [--path pusb_check_path]' \ - % sys.argv[0] + print 'Usage: %s [--config file] [--daemon] [--path pusb_check_path]' % \ + os.path.basename(__file__) sys.exit(1) import getopt