Skip to content

Commit

Permalink
Fix test_get_version_info when the revision is 0
Browse files Browse the repository at this point in the history
The 4.4 tarball has revision 0, which causes it to not be included in
the version info dict. Check for `not None` instead of truthiness.
  • Loading branch information
chewi authored and totaam committed Oct 3, 2022
1 parent edd5fba commit e69eb38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xpra/version_util.py
Expand Up @@ -158,7 +158,7 @@ def get_version_info(full=1) -> dict:
"branch" : BRANCH,
"commit" : COMMIT,
}.items():
if v and v!="unknown":
if v is not None and v!="unknown":
props[k] = v
except ImportError as e:
warn("missing some source information: %s", e)
Expand All @@ -181,7 +181,7 @@ def get_version_info_full() -> dict:
"cython" : "CYTHON_VERSION",
}.items():
v = getattr(build_info, bk, None)
if v:
if v is not None:
props[k] = v
#record library versions:
d = dict((k.lstrip("lib_"), getattr(build_info, k)) for k in dir(build_info) if k.startswith("lib_"))
Expand Down

0 comments on commit e69eb38

Please sign in to comment.