diff --git a/scripts/upgrade/db_update_helper.py b/scripts/upgrade/db_update_helper.py index 45b4b46..41a9853 100644 --- a/scripts/upgrade/db_update_helper.py +++ b/scripts/upgrade/db_update_helper.py @@ -43,6 +43,10 @@ class Utils(object): def info(msg): print Utils.highlight('[INFO] ') + msg + @staticmethod + def warning(msg): + print Utils.highlight('[WARNING] ') + msg + @staticmethod def error(msg): print Utils.highlight('[ERROR] ') + msg @@ -350,10 +354,10 @@ class MySQLDBUpdater(DBUpdater): except Exception, e: if isinstance(e, MySQLdb.OperationalError): msg = str(e.args[1]) + Utils.error('Failed to execute sql: %s' % msg) else: msg = str(e) - - Utils.error('Failed to execute sql: %s' % msg) + Utils.warning('Failed to execute sql: %s' % msg) def apply_sqls(self, info, sql_path): with open(sql_path, 'r') as fp: