|
67 | 67 |
|
68 | 68 | if not args.renumber_endpoints: |
69 | 69 | if 'CDC' in args.devices: |
70 | | - if (args.cdc_ep_num_notification == 0 or args.cdc_ep_num_data_out == 0 or |
71 | | - args.cdc_ep_num_data_in == 0): |
72 | | - raise ValueError("Endpoint address must not be 0") |
| 70 | + if args.cdc_ep_num_notification == 0: |
| 71 | + raise ValueError("CDC notification endpoint number must not be 0") |
| 72 | + elif args.cdc_ep_num_data_out == 0: |
| 73 | + raise ValueError("CDC data OUT endpoint number must not be 0") |
| 74 | + elif args.cdc_ep_num_data_in == 0): |
| 75 | + raise ValueError("CDC data IN endpoint number must not be 0") |
73 | 76 |
|
74 | 77 | if 'MSC' in args.devices: |
75 | | - if args.msc_ep_num_out == 0 or args.msc_ep_num_in == 0: |
76 | | - raise ValueError("Endpoint address must not be 0") |
| 78 | + if args.msc_ep_num_out == 0: |
| 79 | + raise ValueError("MSC endpoint OUT number must not be 0") |
| 80 | + elif args.msc_ep_num_in == 0: |
| 81 | + raise ValueError("MSC endpoint IN number must not be 0") |
77 | 82 |
|
78 | 83 | if 'HID' in args.devices: |
79 | | - if args.args.hid_ep_num_out == 0 or args.hid_ep_num_in == 0: |
80 | | - raise ValueError("Endpoint address must not be 0") |
| 84 | + if args.args.hid_ep_num_out == 0: |
| 85 | + raise ValueError("HID endpoint OUT number must not be 0") |
| 86 | + elif args.hid_ep_num_in == 0: |
| 87 | + raise ValueError("HID endpoint IN number must not be 0") |
81 | 88 |
|
82 | 89 | if 'AUDIO' in args.devices: |
83 | | - if args.midi_ep_num_out == 0 or args.midi_ep_num_in == 0: |
84 | | - raise ValueError("Endpoint address must not be 0") |
| 90 | + if args.args.midi_ep_num_out == 0: |
| 91 | + raise ValueError("MIDI endpoint OUT number must not be 0") |
| 92 | + elif args.midi_ep_num_in == 0: |
| 93 | + raise ValueError("MIDI endpoint IN number must not be 0") |
85 | 94 |
|
86 | 95 | class StringIndex: |
87 | 96 | """Assign a monotonically increasing index to each unique string. Start with 0.""" |
|
0 commit comments