Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
Fix bug in #290 (comment)
  • Loading branch information
hugobuddel committed Nov 1, 2023
1 parent e4ce56d commit a70f7cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scopesim/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def _write_bug_report(stream: TextIO) -> None:
stream.write("\nInstalled IRDB packages:\n")
pkgs_path = Path(rc.__config__["!SIM.file.local_packages_path"])
installed_pkgs = _get_all_irdb_pkgs(pkgs_path)
maxkeylen = max(len(pkg.stem) for pkg in installed_pkgs)
maxkeylen = max((len(pkg.stem) for pkg in installed_pkgs), default=0)
for pkg_path in installed_pkgs:
pkg_ver = _get_irdb_pkg_version(pkg_path)
stream.write(f"{pkg_path.stem:>{maxkeylen+2}}: {pkg_ver}\n")
Expand Down

0 comments on commit a70f7cf

Please sign in to comment.