mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 07:07:13 -05:00
don't fail on old sqlalchemy
This commit is contained in:
parent
80fb6c5230
commit
97cf06b333
1 changed files with 7 additions and 6 deletions
|
|
@ -42,12 +42,13 @@ except ImportError:
|
||||||
|
|
||||||
# dump location of non-unicode string
|
# dump location of non-unicode string
|
||||||
from sqlalchemy import util
|
from sqlalchemy import util
|
||||||
import traceback
|
if getattr(util, 'warn', None):
|
||||||
oldWarn = util.warn
|
import traceback
|
||||||
def newWarn(*args, **kwargs):
|
oldWarn = util.warn
|
||||||
|
def newWarn(*args, **kwargs):
|
||||||
traceback.print_stack()
|
traceback.print_stack()
|
||||||
oldWarn(*args, **kwargs)
|
oldWarn(*args, **kwargs)
|
||||||
util.warn = newWarn
|
util.warn = newWarn
|
||||||
|
|
||||||
# shared metadata
|
# shared metadata
|
||||||
metadata = MetaData()
|
metadata = MetaData()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue