From 070c01f8f133dfc0da82beca6f747b679d27f904 Mon Sep 17 00:00:00 2001
From: Mike Palmiotto <mpalmiotto@tresys.com>
Date: Thu, 10 Oct 2013 16:37:03 -0400
Subject: [PATCH] tools: Don't error out of insertkeys script on whitespace

Many keys end with whitespace or otherwise have whitespace separating the
certificates.  If insertkeys is intended to support multiple certificates, we
should also support blank line separators.

Change-Id: I5fd17be5785ad1b89a6191e9ba33bbc7c5a4e8e9
---
 tools/insertkeys.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/insertkeys.py b/tools/insertkeys.py
index e0eee8d72..7237d6f9e 100755
--- a/tools/insertkeys.py
+++ b/tools/insertkeys.py
@@ -79,7 +79,8 @@ class GenerateKeys(object):
 
             # If we haven't started the certificate, then we should not encounter any data
             elif not inCert:
-                sys.exit("Detected erroneous line \""+ line + "\" on " + str(lineNo)
+                if line is not "":
+                    sys.exit("Detected erroneous line \""+ line + "\" on " + str(lineNo)
                         + " in pem file: " + path)
 
             # else we have started the certicate and need to append the data
-- 
GitLab