From 9ae3b8a0c58f3119903e198b6c2f4c0e882df687 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Apr 20 2020 20:10:26 +0000 Subject: Only write the License tag if it is set. This allows setting self.license to None to prevent the addition of the License tag to the RPM file. --- diff --git a/rpmfluff.py b/rpmfluff.py index 50fab29..e0e00dc 100644 --- a/rpmfluff.py +++ b/rpmfluff.py @@ -827,7 +827,8 @@ class SimpleRpmBuild(RpmBuild): specFile.write("Epoch: %s\n"%self.epoch) specFile.write("Version: %s\n"%self.version) specFile.write("Release: %s\n"%self.release) - specFile.write("License: %s\n"%self.license) + if self.license: + specFile.write("License: %s\n"%self.license) specFile.write("Group: %s\n"%self.basePackage.group) if self.vendor: specFile.write("Vendor: %s\n"%self.vendor)