Commits

Angel Ezquerra  committed befa816

findpatternmatch: return first matching pattern

This makes the function faster (since we exit early) but also makes more sense.

  • Participants
  • Parent commits 6527f03

Comments (0)

Files changed (1)

         if fnmatch.fnmatch(searchtext, pat.lower()):
             patmatch = True
             matchedpattern = pat
+            break
 
     return patmatch, exactmatch, matchedpattern