From c81a4edb26723253ad768bd3d0cf8ff407293fb4 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 19 Mar 2012 12:41:29 -0400 Subject: [PATCH] Actually listen to the --subdevice option in the insn.py demo. --- doc/demo/insn.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/demo/insn.py b/doc/demo/insn.py index ad77e5d..9fc1001 100755 --- a/doc/demo/insn.py +++ b/doc/demo/insn.py @@ -55,7 +55,10 @@ if __name__ == '__main__': device = _Device(filename=args.filename) device.open() - subdevice = device.find_subdevice_by_type(_constant.SUBDEVICE_TYPE.ai) + if args.subdevice is None: + subdevice = device.find_subdevice_by_type(_constant.SUBDEVICE_TYPE.ai) + else: + subdevice = device.subdevice(args.subdevice) insns = [subdevice.insn(), subdevice.insn(), subdevice.insn()] insns[0].insn = insns[2].insn = _constant.INSN.gtod -- 2.26.2