moved from MySQLdb to pymysql (#11462)
This commit is contained in:
parent
36e2fb8d58
commit
7fd20f303f
@ -1,5 +1,5 @@
|
||||
import frappe
|
||||
from MySQLdb import OperationalError
|
||||
from pymysql import InternalError
|
||||
|
||||
def execute():
|
||||
frappe.reload_doctype("Journal Entry Account")
|
||||
@ -15,6 +15,6 @@ def execute():
|
||||
frappe.db.sql("""update `tabJournal Entry Account`
|
||||
set reference_type=%s, reference_name={0} where ifnull({0}, '') != ''
|
||||
""".format(fieldname), doctype)
|
||||
except OperationalError:
|
||||
except InternalError:
|
||||
# column not found
|
||||
pass
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
from __future__ import print_function, unicode_literals
|
||||
import frappe
|
||||
import MySQLdb
|
||||
from frappe.exceptions import SQLError
|
||||
|
||||
def execute():
|
||||
"""
|
||||
@ -31,7 +31,7 @@ def execute():
|
||||
try:
|
||||
migrate_item_variants()
|
||||
|
||||
except MySQLdb.ProgrammingError:
|
||||
except SQLError:
|
||||
print("`tabItem Variant` not found")
|
||||
|
||||
def rename_and_reload_doctypes():
|
||||
|
Loading…
x
Reference in New Issue
Block a user