5 Mar
2015
5 Mar
'15
3:22 p.m.
@@ -293,17 +297,33 @@ if __name__ == "__main__": print mem
if options.download_mmap:
# isinstance(radio, chirp_common.IcomMmapRadio) or fail_unsupported()
radio.sync_in()
radio.save_mmap(options.mmap)
if not issubclass(rclass, chirp_common.CloneModeRadio):
LOG.error("%s is not a clone mode radio" % options.radio)
sys.exit(1)
if not options.mmap:
LOG.error("You must specify the destnation file name with --mmap")
Typo in 'destination'.
sys.exit(1)
try:
radio.sync_in()
radio.save_mmap(options.mmap)
except Exception, e:
LOG.error(e)
This is going to make it really hard to debug what's going on if/when someone reports it. LOG.exception() will dump the exception, but at ERROR level, which is probably not what you want here. Maybe check your global --debug flag and only do it in that case?
sys.exit(1)
if options.upload_mmap:
# isinstance(radio, chirp_common.IcomMmapRadio) or fail_unsupported()
radio.load_mmap(options.mmap)
if radio.sync_out():
print "Clone successful"
else:
LOG.error("Clone failed")
if not issubclass(rclass, chirp_common.CloneModeRadio):
LOG.error("%s is not a clone mode radio" % options.radio)
sys.exit(1)
if not options.mmap:
LOG.error("You must specify the destnation file name with --mmap")
Same typo here.
--Dan