Skip to content

Commit

Permalink
Fix radioreference query with subcat missing name
Browse files Browse the repository at this point in the history
Some subcategories in RR are missing the scName attribute. This catches
that case and just uses an "Unknown" placeholder since all we are
using it for is status display.

Fixes: #10677
  • Loading branch information
kk7ds committed Jun 27, 2023
1 parent bc1824a commit 7ce4482
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion chirp/sources/radioreference.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,15 @@ def do_fetch(self, status, params):
self._auth)
self._freqs += result
status_cur += 1
try:
sc_name = subcat.scName
except AttributeError:
sc_name = 'Unknown Category'

status.send_status(
'Fetching agency %s %s:%s' % (agency.aid,
cat.cName,
subcat.scName),
sc_name),
status_cur / status_max * 100)
status.send_end()

Expand Down

0 comments on commit 7ce4482

Please sign in to comment.