Skip to content

Commit

Permalink
Merge pull request #174 from taylorcoffelt/fix_regex_issue_2_3_3
Browse files Browse the repository at this point in the history
Fix bad regex for 'single' default configs
  • Loading branch information
allangood authored Nov 5, 2022
2 parents 65faf8d + 22a3a91 commit 48cd27b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rtlamr2mqtt-addon/rtlamr2mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,9 @@ def listen_mode():
if re.match(r"(^(0[xX])?[A-Fa-f0-9]{4}:(0[xX])?[A-Fa-f0-9]{4}$)", usb_device_id) is not None:
usb_device_index = '-d {}'.format(str(usb_devices[usb_device_id]['index']))
usb_port = str(usb_devices[usb_device_id]['bus_address'])
elif re.match(r"(^[0-9]{3}:([0-9]{3}$)))", usb_device_id) is not None:
log_message('Using USB port ID: {}'.format(device_id))
usb_port = device_id
elif re.match(r"(^[0-9]{3}:([0-9]{3}$))", usb_device_id) is not None:
log_message('Using USB port ID: {}'.format(usb_device_id))
usb_port = usb_device_id
else:
log_message('No USB device specified in the config file, using the first found.')
usb_device_id = list(usb_devices.keys())[0]
Expand Down

0 comments on commit 48cd27b

Please sign in to comment.