Picked up during testing.
Adding a matchtype
operator to a search triggered an exception
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/ben/Documents/src.old/file_location_listing/./server/../lib/dosearch.py", line 101, in searchIndexChunk
url = e[m[0]].lower()
Activity
01-Jan-24 15:02
assigned to @btasker
01-Jan-24 15:06
This happens because conditionals have been combined when testing keywords a little further up that function:
So, if
m[0] == "k"
butmatchtype
has been set totitle
orurl
we won't enter that conditional block.But
e['k']
is a list, so we obviously can't calllower()
on it.That earlier conditional needs breaking into two, with a
continue
occurring regardless of whether the second conditional matches or not.01-Jan-24 15:08
mentioned in commit 7dcbecb83eff4fe5db022391a1106fa5d8bd1cd3
Message
fix: don't attempt to cast tags dict to lowercase (utilities/file_location_listing#32)