Fix the conflict of urlparse between python2 and python3
Story: 2003310 Task: 27860 Change-Id: Ib8e3932526af47ca0a7306b74000f8e108bd211d Signed-off-by: brandonzhao <zhaolong@inspur.com>
This commit is contained in:
parent
4d82104ecf
commit
2e41ac07d5
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import urlparse
|
from six.moves.urllib.parse import urlparse
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ from oslo_db.sqlalchemy import models
|
||||||
|
|
||||||
|
|
||||||
def table_args():
|
def table_args():
|
||||||
engine_name = urlparse.urlparse(cfg.CONF.database_connection).scheme
|
engine_name = urlparse(cfg.CONF.database_connection).scheme
|
||||||
if engine_name == 'mysql':
|
if engine_name == 'mysql':
|
||||||
return {'mysql_engine': 'InnoDB',
|
return {'mysql_engine': 'InnoDB',
|
||||||
'mysql_charset': "utf8"}
|
'mysql_charset': "utf8"}
|
||||||
|
|
Loading…
Reference in New Issue