Skip to content

Commit

Permalink
Remove debug
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida committed Apr 21, 2021
1 parent e2d25c6 commit fd70622
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions superset/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ def refresh_druid(datasource: str, merge: bool) -> None:
)
def export_dashboards(dashboard_file: Optional[str] = None) -> None:
"""Export dashboards to ZIP file"""
print("\nRIGHT WAS CALLED", dashboard_file)
from superset.dashboards.commands.export import ExportDashboardsCommand
from superset.models.dashboard import Dashboard

Expand All @@ -264,7 +263,6 @@ def export_dashboards(dashboard_file: Optional[str] = None) -> None:
timestamp = datetime.now().strftime("%Y%m%dT%H%M%S")
root = f"dashboard_export_{timestamp}"
dashboard_file = dashboard_file or f"{root}.zip"
print("\n\nBETO >>", dashboard_file)

try:
with ZipFile(dashboard_file, "w") as bundle:
Expand Down Expand Up @@ -385,15 +383,13 @@ def export_dashboards(
dashboard_file: Optional[str], print_stdout: bool = False
) -> None:
"""Export dashboards to JSON"""
print("\n\nWRONG WAS CALLED", dashboard_file, print_stdout)
from superset.utils import dashboard_import_export

data = dashboard_import_export.export_dashboards(db.session)
if print_stdout or not dashboard_file:
print(data)
if dashboard_file:
logger.info("Exporting dashboards to %s", dashboard_file)
print("\n\nBETO >>", dashboard_file)
with open(dashboard_file, "w") as data_stream:
data_stream.write(data)

Expand Down

0 comments on commit fd70622

Please sign in to comment.