Skip to content

Commit

Permalink
Merge pull request #439 from zapta/develop
Browse files Browse the repository at this point in the history
Assorted cleanups
  • Loading branch information
Obijuan authored Oct 13, 2024
2 parents 3158504 + 615b336 commit da8903a
Show file tree
Hide file tree
Showing 17 changed files with 605 additions and 275 deletions.
5 changes: 3 additions & 2 deletions apio/commands/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
\b
Examples:
apio graph
apio graph # Graph the top module
apio graph -t my_module # Graph the selected module
The graph command generates the graph in .dot format and then invokes
the dot command from the path to convert it to a .svg format. The dot
Expand All @@ -46,7 +47,7 @@
)
@click.pass_context
@options.project_dir_option
@options.top_module_option_gen()
@options.top_module_option_gen(help="Set the name of the top module to graph.")
@options.verbose_option
def cli(
ctx: Context,
Expand Down
3 changes: 3 additions & 0 deletions apio/commands/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
\b
Examples:
apio time
The time command supportw ICE40 devcies. ECP5 and Gowin devices are not
supported yet.
"""


Expand Down
14 changes: 6 additions & 8 deletions apio/managers/drivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,15 +461,15 @@ def _ftdi_enable_windows(self):
if zadig_ini_dst.exists():
zadig_ini_dst.unlink()

return result.get("returncode")
return result.exit_code

@staticmethod
def _ftdi_disable_windows():
click.secho("Launch device manager")
click.secho(FTDI_UNINSTALL_DRIVER_INSTRUCTIONS, fg="yellow")

result = util.exec_command("mmc devmgmt.msc")
return result.get("returncode")
return result.exit_code

# W0703: Catching too general exception Exception (broad-except)
# pylint: disable=W0703
Expand All @@ -490,19 +490,17 @@ def _serial_enable_windows(self):
"Serial drivers configuration finished", fg="green"
)
else:
result = 1
result = util.CommandResult(exit_code=1)
except Exception as exc:
click.secho("Error: " + str(exc), fg="red")
result = 1
result = util.CommandResult(exit_code=1)

if not isinstance(result, int):
result = result.get("returncode")
return result
return result.exit_code

@staticmethod
def _serial_disable_windows():
click.secho("Launch device manager")
click.secho(SERIAL_UNINSTALL_DRIVER_INSTRUCTIONS, fg="yellow")

result = util.exec_command("mmc devmgmt.msc")
return result.get("returncode")
return result.exit_code
Loading

0 comments on commit da8903a

Please sign in to comment.