Except MySQL error

Batista, Facundo FBatista at uniFON.com.ar
Thu Jun 24 09:35:21 EDT 2004


[Florian Lindner]

#- Hello,
#- I want to except the error which is raised in MySQLdb module 
#- when one is
#- trying to insert a value in a primary key column which 
#- already exists. But
#- I don't know which error to except...
#- Thx,
#- Florian

Well, using the SAME python and MySQLdb installation...

...with MySQL 3.1, it was a warning so the program wouldn't stop.

...with MySQL 4.0, it was an error so an Exception was generated.

.	Facundo




More information about the Python-list mailing list