Skip to content

Commit

Permalink
Fixed types for exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasilije1990 committed Nov 29, 2023
1 parent c3edfaa commit de719e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dlt/cli/magics.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def init(self, line:str) -> t.Any:
else:
return self.display(self.success_message({"green-bold": "DLT project initialized successfully."}))
except Exception as ex:
self.on_exception(ex, DLT_INIT_DOCS_URL)
self.on_exception(str(ex), DLT_INIT_DOCS_URL)
return -1

@magic_arguments()
Expand Down Expand Up @@ -204,7 +204,7 @@ def words_to_cron(description):
return self.display(self.success_message({"green-bold": "DLT deploy magic ran successfully."}))
except Exception as ex:

self.on_exception(ex, DLT_DEPLOY_DOCS_URL)
self.on_exception(str(ex), DLT_DEPLOY_DOCS_URL)
return -1
@magic_arguments()
@argument('--operation', type=str,default=None, help="Operation to perform on the pipeline")
Expand All @@ -230,7 +230,7 @@ def pipeline(self, line:str)->t.Any:

)
except Exception as ex:
self.on_exception(ex, DLT_PIPELINE_COMMAND_DOCS_URL)
self.on_exception(str(ex), DLT_PIPELINE_COMMAND_DOCS_URL)
return -2
@magic_arguments()
@argument('--file_path', type=str, help="Schema file name, in yaml or json format")
Expand All @@ -252,7 +252,7 @@ def schema(self, line:str)->t.Any:
)
return self.display(self.success_message({"green-bold": "DLT schema magic ran successfully."}))
except Exception as ex:
self.on_exception(ex, "Schema Documentation URL") # Replace with actual URL
self.on_exception(str(ex), "Schema Documentation URL") # Replace with actual URL
return -1
@line_magic
@register_line_magic
Expand Down

0 comments on commit de719e9

Please sign in to comment.