Skip to content
Snippets Groups Projects
Commit f959bb8e authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Trying to get rid of pyudev deprecation warning

parent 5c22eba5
No related branches found
No related tags found
No related merge requests found
...@@ -42,6 +42,8 @@ A stechuhr client consists of: ...@@ -42,6 +42,8 @@ A stechuhr client consists of:
## Installation ## Installation
Make sure SPI is enabled on the raspi (`raspi-config` > Interfacing Options)
### Install the dependecies ### Install the dependecies
```bash ```bash
......
...@@ -210,8 +210,8 @@ def open_cardreader(config, logger) -> '_io.BufferedReader': ...@@ -210,8 +210,8 @@ def open_cardreader(config, logger) -> '_io.BufferedReader':
# Filter out the devices that are None or don't fit vendor or model ids # Filter out the devices that are None or don't fit vendor or model ids
devices = [d for d in devices if d.device_node is not None] devices = [d for d in devices if d.device_node is not None]
devices = [d for d in devices if d['ID_VENDOR_ID'] == config["reader"]["vendor_id"]] devices = [d for d in devices if d.properties['ID_VENDOR_ID'] == config["reader"]["vendor_id"]]
devices = [d for d in devices if d['ID_MODEL_ID'] == config["reader"]["model_id"]] devices = [d for d in devices if d.properties['ID_MODEL_ID'] == config["reader"]["model_id"]]
# If no device found, exit # If no device found, exit
if len(devices) == 0: if len(devices) == 0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment