mirror of https://github.com/dbcli/pgcli
fix IPython magic (#1253)
This commit is contained in:
parent
e009995e9f
commit
a017fa96bf
|
@ -14,6 +14,7 @@ Bug fixes:
|
|||
* Fix issue where `syntax_style` config value would not have any effect. (#1212)
|
||||
* Fix crash because of not found `InputMode.REPLACE_SINGLE` with prompt-toolkit < 3.0.6
|
||||
* Fix comments being lost in config when saving a named query. (#1240)
|
||||
* Fix IPython magic for ipython-sql >= 0.4.0
|
||||
|
||||
3.1.0
|
||||
=====
|
||||
|
|
|
@ -25,7 +25,11 @@ def pgcli_line_magic(line):
|
|||
if hasattr(sql.connection.Connection, "get"):
|
||||
conn = sql.connection.Connection.get(parsed["connection"])
|
||||
else:
|
||||
conn = sql.connection.Connection.set(parsed["connection"])
|
||||
try:
|
||||
conn = sql.connection.Connection.set(parsed["connection"])
|
||||
# a new positional argument was added to Connection.set in version 0.4.0 of ipython-sql
|
||||
except TypeError:
|
||||
conn = sql.connection.Connection.set(parsed["connection"], False)
|
||||
|
||||
try:
|
||||
# A corresponding pgcli object already exists
|
||||
|
|
Loading…
Reference in New Issue