Browse Source

ARGV[0] fixup

Andrea Luzzardi 18 years ago
parent
commit
f31748d634
2 changed files with 4 additions and 3 deletions
  1. +2
    -1
      tools/pusb_adm
  2. +2
    -2
      tools/pusb_hotplug

+ 2
- 1
tools/pusb_adm View File

@ -18,6 +18,7 @@
import dbus import dbus
import sys import sys
import os
from xml.dom import minidom from xml.dom import minidom
class Device: class Device:
@ -134,7 +135,7 @@ def addDevice(options):
print 'Done.' print 'Done.'
def usage(): def usage():
print 'Usage: %s [--config file] --add-device <name> [--no-autodetect]' % sys.argv[0]
print 'Usage: %s [--config file] --add-device <name> [--no-autodetect]' % os.path.basename(__file__)
sys.exit(1) sys.exit(1)
import getopt import getopt


+ 2
- 2
tools/pusb_hotplug View File

@ -102,8 +102,8 @@ class Log:
syslog.syslog(priority, message) syslog.syslog(priority, message)
def usage(): 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) sys.exit(1)
import getopt import getopt


Loading…
Cancel
Save