Skip to content

Commit

Permalink
Report simpler Python version string in About and Error dialogs
Browse files Browse the repository at this point in the history
A gramps user reported on the discourse forum that information in the about box was truncated, and he could not expand the box to view the rest of the text.

A look at the text in question suggested a simple change: the truncated string is intended to be the Python version which is typically major.minor.patch version, but the text being displayed is the output of sys.version() which includes additional information including build number and compiler used. For the About box this isn't necessarily useful, so this PR replaces that call with platform.python_version() which returns just the version and resolves the truncated string issue. The same change is also made in the error report dialog for consistency.

An unrelated change is also included in this PR: after building the AIO bundle locally several artifacts are generated (or downloaded) to the source folder, which have been added to .gitignore to avoid tracking with git.
  • Loading branch information
hgohel committed Dec 21, 2023
1 parent 037c5d3 commit be8e476
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ dist/
# Gramps
docs/_build/

# Gramps AIO build artifacts
aio/grampsaio64.nsi
aio/mingw-w64-x86_64-db-*.pkg.tar.xz
aio/mingw64
gramps.egg-info

# Editing
tags
*.swp
Expand Down
2 changes: 1 addition & 1 deletion gramps/gui/aboutdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def get_versions(self):
+ distro
) % (
ellipses(str(VERSION)),
ellipses(str(sys.version).replace("\n", "")),
ellipses(platform.python_version()),
BSDDB_STR,
ellipses(get_env_var("LANG", "")),
ellipses(platform.system()),
Expand Down
2 changes: 1 addition & 1 deletion gramps/gui/logger/_errorreportassistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def _get_sys_information(self):
"cairo version : %s"
% (
str(VERSION),
str(sys.version).replace("\n", ""),
platform.python_version(),
BSDDB_STR,
sqlite,
get_env_var("LANG", ""),
Expand Down

0 comments on commit be8e476

Please sign in to comment.