]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
Be sure that we got any comment actually.
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 5 Mar 2021 08:28:33 +0000 (09:28 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 5 Mar 2021 08:28:33 +0000 (09:28 +0100)
rediff-patches.py

index 2fb1986ce03be9292d6771b8e875a0e156e49805..beba06da881d2c0ba896385c51cc2efc9fbfe17e 100755 (executable)
@@ -66,12 +66,14 @@ def unpack(spec, appsourcedir, builddir):
 
 def patch_comment_get(patch):
     patch_comment = ""
+    patch_got = False
     with open(patch, 'rt') as f:
         for line in f:
             if line.startswith('diff ') or line.startswith('--- '):
+                patch_got = True
                 break
             patch_comment += line
-    return patch_comment
+    return patch_comment if patch_got else ""
 
 def diff(diffdir_org, diffdir, builddir, patch_comment, output):
     diffdir_org = os.path.basename(diffdir_org)
This page took 0.055162 seconds and 4 git commands to generate.