]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - rediff-patches.py
Be sure that we got any comment actually.
[packages/rpm-build-tools.git] / 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.028358 seconds and 4 git commands to generate.