hughhhh commented on a change in pull request #11529:
URL:
https://github.com/apache/incubator-superset/pull/11529#discussion_r520145414
##########
File path: superset/cli.py
##########
@@ -247,14 +247,11 @@ def import_dashboards(path: str, recursive: bool,
username: str) -> None:
files.extend(path_object.rglob("*.json"))
if username is not None:
g.user = security_manager.find_user(username=username)
- for file_ in files:
- logger.info("Importing dashboard from file %s", file_)
- try:
- with file_.open() as data_stream:
- dashboard_import_export.import_dashboards(db.session,
data_stream)
- except Exception as ex: # pylint: disable=broad-except
- logger.error("Error when importing dashboard from file %s", file_)
- logger.error(ex)
+ contents = {path.name: open(path).read() for path in files}
Review comment:
is contents being used here?
----------------------------------------------------------------
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]