def main(): """ The tendril-runtest script entry point. """ parser = _get_parser() args = parser.parse_args() if not args.serialno and not args.detect: parser.print_help() return sno = None devicetype = None if args.detect: try: mactype = args.detect[0] sno = macs.get_sno_from_device(mactype) except: logger.error("Got exception when trying to detect serialno") raise if not sno: sno = args.serialno if args.offline: devicetype = args.offline[0] try: run(sno, args.force, args.stale, devicetype) except KeyboardInterrupt: print Fore.RED + "Tendril runtest aborted by user!" + Fore.RESET
def main(): """ The tendril-writecalib script entry point. """ parser = _get_parser() args = parser.parse_args() if not args.serialno and not args.detect: parser.print_help() return if args.dry_run: print "Dry run not yet implemented. Not doing anything." return if not args.serialno: try: mactype = args.detect[0] sno = macs.get_sno_from_device(mactype) except: logger.error("Got exception when trying to detect serialno") raise else: sno = args.serialno run(sno)