summaryrefslogtreecommitdiffstats
path: root/toprammer
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2015-11-26 19:11:19 +0100
committerMichael Buesch <m@bues.ch>2015-11-26 19:11:19 +0100
commit30389ab2bb476dcde8e2c10ce5f976a0d1a03650 (patch)
tree2ce15c4290242c8c1f7dc0f831924e06bd04ca63 /toprammer
parent1231d30f9c9cba9d82403ba238611bb58d0686e6 (diff)
downloadtoprammer-30389ab2bb476dcde8e2c10ce5f976a0d1a03650.tar.xz
toprammer-30389ab2bb476dcde8e2c10ce5f976a0d1a03650.zip
Port to latest PyUSB
Signed-off-by: Michael Buesch <m@bues.ch>
Diffstat (limited to 'toprammer')
-rwxr-xr-xtoprammer13
1 files changed, 3 insertions, 10 deletions
diff --git a/toprammer b/toprammer
index 0b8e470..bbeb40b 100755
--- a/toprammer
+++ b/toprammer
@@ -64,8 +64,8 @@ def usage():
print "Other options:"
print " -t|--list Print a list of supported chips and exit."
print " Use -V|--verbose to control the list verbosity (0-4)"
- print " -d|--device DEVID Use a specific programmer. For USB:"
- print " usb:BUSNR.DEVNR"
+ print " -d|--device DEVID Use a specific programmer. Example for USB:"
+ print " usb:TOP2049:0"
print " First found programmer is used, if not given."
print " -V|--verbose LEVEL Set the verbosity level:"
print " 0 => show warnings"
@@ -177,14 +177,7 @@ def main(argv):
if o in ("-t", "--list"):
opt_action = "print-list"
if o in ("-d", "--device"):
- try:
- v = v.replace('.', ':').split(':')
- opt_device = "%s:%03d:%03d" %\
- (v[0], int(v[1], 10),
- int(v[2], 10))
- except (IndexError, ValueError), e:
- print("-d|--device invalid DEVID.")
- return 1
+ opt_device = v
if o in ("-V", "--verbose"):
opt_verbose = int(v)
if o in ("-o", "--force"):
bues.ch cgit interface