diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2016-11-09 16:18:34 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2016-11-09 16:19:13 +0300 |
commit | f6fc4fa0ba921a9333ae957ac8de00ef4cea74ea (patch) | |
tree | d710754e26df25a8b7af13eeb9f3fcb21462ca5e | |
parent | 062aa6f6fa6f3e4859c940243b5c15b4db16c989 (diff) |
Only report changed legacy hints when they exist for both packages
This prevents bogus reports of a change when the legacy hint for a package
doens't exist, because a pvr.hint is used instead.
-rwxr-xr-x | calm/package.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/calm/package.py b/calm/package.py index 7861d2d..4daf8ab 100755 --- a/calm/package.py +++ b/calm/package.py @@ -798,7 +798,7 @@ def merge(a, *l): # assign the legacy hints from b to all vr in a which didn't # have a pvr.hint. Instead, just report if it's going to # change and let things get sorted out later on... - if a[p].legacy_hints != b[p].legacy_hints: + if a[p].legacy_hints and b[p].legacy_hints and a[p].legacy_hints != b[p].legacy_hints: diff = '\n'.join(difflib.ndiff( pprint.pformat(a[p].legacy_hints).splitlines(), pprint.pformat(b[p].legacy_hints).splitlines())) |