Ticket #421 (closed defect: worksforme)

Opened 21 months ago

Last modified 18 months ago

paste.util.mimeparse:best_match exception when weighted_matches is empty

Reported by: pedersen Owned by: ianb
Priority: normal Milestone: 1.5
Component: paste Version: released-version
Severity: normal Keywords:
Cc:

Description

 http://bitbucket.org/ianb/paste/src/tip/paste/util/mimeparse.py

Last line of this file has a problem. If weighted_matches is empty, an exception is generated.

Suggested fix is to change to this:

try:

return weighted_matches[-1][0][1] and weighted_matches[-1][1]

except:

return

Change History

Changed 18 months ago by ianb

  • status changed from new to closed
  • resolution set to worksforme

I think the update to mimeparse either fixed or invalidated this

Note: See TracTickets for help on using tickets.