mortenb123
6 years agoContributor
python exception on ClickItem() not caught
I have some usb smartcards that switches adressing based on windows discovery, so they can show up ending with either 0 or 1, but I'm unable to catch when the clickitem() does not exists, it always fails.
for reader in ["Gemalto USB Smart Card Reader {n}", "Gemalto IDBridge CT7xx {n}"]: for n in range(2): myreader = reader.format(n=n) try: app.MainWindow.TabControl2.TabControlConfig.ItemsControl.ComboboxOperatorCardReader.ClickItem(myreader) except Exceptions as e: if n>=1: Log.Error(f"{e}") continue else:
Log.Message(f"found {myreader}") break
Thanks