summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnsa10
1 files changed, 9 insertions, 1 deletions
diff --git a/nsa b/nsa
index 45f32f2..0e6f180 100755
--- a/nsa
+++ b/nsa
@@ -426,7 +426,10 @@ while (1) do
(header, content) = line.split(':', 2);
content.strip!
if header.upcase == "SUBJECT"
- project = /Announce\s+([A-Za-z0-9_-]+)/.match(content)[1];
+ m = /Announce\s+([A-Za-z0-9_-]+)/.match(content)
+ if m
+ project = m[1];
+ end
end
elsif (not in_headers)
lines.push line
@@ -436,6 +439,11 @@ while (1) do
fh.close
File.unlink(filename)
+ if project.nil?
+ puts "Ignoring invalid mail without project"
+ next
+ end
+
puts "Project "+project
puts "commitmsg "+commitmsg