Improve icon_from_mimetype
commitee97e844add03a0f5f15e672a4db3e5d5a91107a
authorAdrian Moennich <adrian.moennich@cern.ch>
Thu, 2 Jul 2015 16:21:34 +0000 (2 18:21 +0200)
committerAdrian Moennich <adrian.moennich@cern.ch>
Wed, 8 Jul 2015 14:12:48 +0000 (8 16:12 +0200)
tree229023296b7568d68af92e8fda4b80437a79e842
parentc52fafa4436ca736324fb2c1d2740e2b6b9e0c28
Improve icon_from_mimetype

- proper dict usage (one does not simply iterate over a dict when [] can
  be used)
- compile regexes at import time
- lowercase matching
indico/util/mimetypes.py
indico/util/mimetypes_test.py