eschutho commented on a change in pull request #13344:
URL: https://github.com/apache/superset/pull/13344#discussion_r583103774



##########
File path: superset/databases/commands/test_connection.py
##########
@@ -60,20 +61,34 @@ def run(self) -> None:
                 database.db_engine_spec.mutate_db_for_connection_test(database)
                 username = self._actor.username if self._actor is not None 
else None
                 engine = database.get_sqla_engine(user_name=username)
-            with closing(engine.raw_connection()) as conn:
-                if not engine.dialect.do_ping(conn):
-                    raise DBAPIError(None, None, None)
+                with closing(engine.raw_connection()) as conn:

Review comment:
       I'm not sure what the intention was here, but if database is None, then 
this statement fails because engine is not defined, so I put it inside this 
block. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to