File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -706,7 +706,16 @@ def cell0_default_connection():
706
706
# worry about parsing and splitting a URL which could have special
707
707
# characters in the password, which makes parsing a nightmare.
708
708
url = sqla_url .make_url (connection )
709
- url .database = url .database + '_cell0'
709
+
710
+ # TODO(gibi): remove hasattr() conditional in favor of "url.set()"
711
+ # when SQLAlchemy 1.4 is the minimum version in requirements
712
+ if hasattr (url , "set" ):
713
+ url = url .set (database = url .database + '_cell0' )
714
+ else :
715
+ # TODO(zzzeek): remove when SQLAlchemy 1.4
716
+ # is the minimum version in requirements
717
+ url .database = url .database + '_cell0'
718
+
710
719
return urlparse .unquote (str (url ))
711
720
712
721
dbc = database_connection or cell0_default_connection ()
You can’t perform that action at this time.
0 commit comments