mechanize 0.2 uses its own ControlNotFoundError exception
This commit is contained in:
parent
e5a8c2e277
commit
d5b1105b9c
3 changed files with 16 additions and 6 deletions
|
|
@ -16,7 +16,10 @@
|
|||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
|
||||
import ClientForm
|
||||
try:
|
||||
from mechanize import ControlNotFoundError
|
||||
except ImportError:
|
||||
from ClientForm import ControlNotFoundError
|
||||
|
||||
from .base import CragrBasePage
|
||||
|
||||
|
|
@ -33,7 +36,7 @@ class LoginPage(CragrBasePage):
|
|||
try:
|
||||
self.browser['numero'] = login
|
||||
self.browser['code'] = password
|
||||
except ClientForm.ControlNotFoundError:
|
||||
except ControlNotFoundError:
|
||||
try:
|
||||
self.browser['userLogin'] = login
|
||||
self.browser['userPassword'] = password
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue