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
|
||||
from sqlalchemy import util
|
||||
import traceback
|
||||
oldWarn = util.warn
|
||||
def newWarn(*args, **kwargs):
|
||||
if getattr(util, 'warn', None):
|
||||
import traceback
|
||||
oldWarn = util.warn
|
||||
def newWarn(*args, **kwargs):
|
||||
traceback.print_stack()
|
||||
oldWarn(*args, **kwargs)
|
||||
util.warn = newWarn
|
||||
util.warn = newWarn
|
||||
|
||||
# shared metadata
|
||||
metadata = MetaData()
|
||||
|
|
|
|||
Loading…
Reference in a new issue