Fix packager identity detection to use fallbacks properly

Setting 'None' to the 'packager' field caused generated
spec files to have the packager identity of "None" instead
of using the fallbacks as specified in the spec template.

This adjustment makes the spec template fallbacks for the
packager identity work as expected.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
Neal Gompa 2019-05-04 20:43:54 -04:00
parent c54d2409da
commit a41e9755ec

View file

@ -310,7 +310,9 @@ def main():
kwargs["date"] = time.strftime("%a %b %d %T %Z %Y") kwargs["date"] = time.strftime("%a %b %d %T %Z %Y")
else: else:
kwargs["date"] = time.strftime("%a %b %d %Y") kwargs["date"] = time.strftime("%a %b %d %Y")
kwargs["packager"] = detect_packager() packager_identity = detect_packager()
if packager_identity is not None:
kwargs["packager"] = packager_identity
if metadata.license is not None: if metadata.license is not None:
license, comments = licensing.translate_license(args.target, metadata.license) license, comments = licensing.translate_license(args.target, metadata.license)