iro/controller/user.py
branchdevel
changeset 93 ee10253258ad
parent 92 f479738b4879
child 96 883b25b0b760
equal deleted inserted replaced
92:f479738b4879 93:ee10253258ad
     1 import logging
     1 import logging
     2 import re
     2 import re
     3 
     3 
     4 from .database import WithSession
     4 from .database import WithSession
     5 from model import User
     5 from ..model import User
     6 
     6 
     7 from error import UserNotFound, InterfaceException, ValidateException
     7 from ..error import UserNotFound, InterfaceException, ValidateException
     8 
       
     9 
     8 
    10 
     9 
    11 def rehash(hash):
    10 def rehash(hash):
    12     if not re.match(r'^[a-f0-9]{15,}$', hash.lower()):
    11     if not re.match(r'^[a-f0-9]{15,}$', hash.lower()):
    13         raise ValidateException()
    12         raise ValidateException()