selectors.py
branchstable
changeset 2274 885873dc4361
parent 2254 f632b06058c4
child 2293 7ded2a1416e4
child 2308 b478c3a8ad2a
equal deleted inserted replaced
2273:daf6e178659f 2274:885873dc4361
   618         try:
   618         try:
   619             etype = req.form['etype']
   619             etype = req.form['etype']
   620         except KeyError:
   620         except KeyError:
   621             try:
   621             try:
   622                 etype = kwargs['etype']
   622                 etype = kwargs['etype']
       
   623             except KeyError:
       
   624                 return 0
       
   625         else:
       
   626             # only check this is a known type if etype comes from req.form,
       
   627             # else we want the error to propagate
       
   628             try:
       
   629                 etype = cls.vreg.case_insensitive_etypes[etype.lower()]
       
   630                 req.form['etype'] = etype
   623             except KeyError:
   631             except KeyError:
   624                 return 0
   632                 return 0
   625         return self.score_class(cls.vreg.etype_class(etype), req)
   633         return self.score_class(cls.vreg.etype_class(etype), req)
   626 
   634 
   627 
   635