kushaldas / johnnycanencrypt

Python module for OpenPGP written in Rust.
GNU Lesser General Public License v3.0
51 stars 9 forks source link

is_smartcard_connected should handle card access error gracefully #80

Closed kushaldas closed 2 years ago

kushaldas commented 2 years ago

The following happened in Tumpa when I removed the card randomly.

.venv/bin/python3 ./run.py
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: NotTransacted', /home/kdas/.cargo/registry/src/github.com-1ecc6299db9ec823/talktosc-0.1.1/src/lib.rs:81:70
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
  File "/home/kdas/code/tumpa/src/tumpa/__init__.py", line 31, in run
    result = rjce.is_smartcard_connected()
pyo3_runtime.PanicException: called `Result::unwrap()` on an `Err` value: NotTransacted
kushaldas commented 2 years ago

This is now fixed.