Skip to content

Commit

Permalink
[py2py3] WMQuality.TestInit - Remove dependency on MySQL-python
Browse files Browse the repository at this point in the history
This is related to dmwm#9805

We want not to depend anymore on MySQL-python, since it does
not support python3.

This is the only occurrence of this package left in dmwm/WMCore
  • Loading branch information
mapellidario committed Jul 15, 2020
1 parent ebd6139 commit a26d938
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/python/WMQuality/TestInit.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import threading
import traceback

from _mysql_exceptions import OperationalError

from WMCore.Agent.Configuration import Configuration
from WMCore.Agent.Configuration import loadConfigurationFile
from WMCore.WMException import WMException
Expand Down Expand Up @@ -157,8 +155,9 @@ def setDatabaseConnection(self, connectUrl=None, socket=None, destroyAllDatabase
# If the database is not empty when we go to set the schema, abort!
try:
result = self.init.checkDatabaseContents()
except OperationalError:
except Exception as e:
logging.debug("Error checking DB contents, assume DB does not exist")
logging.debug(str(e))
return
if len(result) > 0:
msg = "Database not empty, cannot set schema !\n"
Expand Down

0 comments on commit a26d938

Please sign in to comment.