Added debug parameter. More sanity checks. Return empty result set if no
actual results were returned.
This commit is contained in:
@@ -23,6 +23,7 @@ optp.add_option("--code", action="append", dest="unlock_codes", metavar="UNLOCK_
|
||||
optp.add_option("--devicexml", dest="devicexml", metavar="FILE", help="Use specified GarminDevice.xml (also implies -E)")
|
||||
optp.add_option("--json", action="store_true", dest="json", default=False, help="Output JSON")
|
||||
optp.add_option("--list-devices", action="store_true", dest="list_devices", default=False, help="Show a list of SKUs and product names")
|
||||
optp.add_option("--debug", action="store_true", dest="debug", default=False, help="Dump raw server requests and replies to files")
|
||||
|
||||
optp.usage = """
|
||||
%prog [options] SKU1 [SKU2..SKUn]
|
||||
@@ -50,6 +51,9 @@ elif len(device_skus) < 1 and not opts.devicexml:
|
||||
|
||||
us = updateserver.UpdateServer()
|
||||
|
||||
if opts.debug:
|
||||
us.debug = True
|
||||
|
||||
if opts.devicexml:
|
||||
# Filename given, load GarminDevice.xml from there; also disable WebUpdater
|
||||
print("Using GarminDevice.xml from {}.".format(opts.devicexml))
|
||||
|
||||
Reference in New Issue
Block a user