Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/1602.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Layout file warnings
10 changes: 7 additions & 3 deletions src/pyedb/dotnet/edb.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,11 +839,15 @@ def import_layout_file(
try:
subprocess.run(cmd_translator, check=True) # nosec
except subprocess.CalledProcessError as e: # nosec
raise RuntimeError("An error occurred while translating board file to ``edb.def`` file") from e
raise RuntimeError(
"An error occurred while translating board file to ``edb.def`` file. Please check the log file."
) from e
if not os.path.exists(os.path.join(working_dir, aedb_name)):
raise RuntimeWarning(f"Translator failed. command : {' '.join(cmd_translator)}")
raise RuntimeWarning(
f"Translation failed. command : {' '.join(cmd_translator)}. Please check the log file."
)
else:
self.logger.info("Translation correctly completed")
self.logger.info("Translation successfully completed")
self.edbpath = os.path.join(working_dir, aedb_name)
return self.open_edb()

Expand Down
11 changes: 7 additions & 4 deletions src/pyedb/grpc/edb.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,12 +875,15 @@ def import_layout_file(
try:
subprocess.run(cmd_translator, check=True) # nosec
except subprocess.CalledProcessError as e: # nosec
raise RuntimeError("An error occurred while translating board file to ``edb.def`` file") from e
raise RuntimeError(
"An error occurred while translating board file to ``edb.def`` file. Please check the log file."
) from e
if not os.path.exists(os.path.join(working_dir, aedb_name)):
self.logger.error("Translator failed to translate.")
return False
raise RuntimeWarning(
f"Translation failed. command : {' '.join(cmd_translator)}. Please check the log file."
)
else:
self.logger.info("Translation correctly completed")
self.logger.info("Translation successfully completed")
self.edbpath = os.path.join(working_dir, aedb_name)
return self.open_edb()

Expand Down
Loading