From f31748d634d05772276cf1aee7e2aa26a58f18f1 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Wed, 1 Nov 2006 16:31:19 +0000 Subject: [PATCH] ARGV[0] fixup --- tools/pusb_adm | 3 ++- tools/pusb_hotplug | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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