aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Palmiotto <mpalmiotto@tresys.com>2013-10-10 16:37:03 -0400
committerWilliam Roberts <wroberts@tresys.com>2013-10-10 17:40:23 -0400
commit070c01f8f133dfc0da82beca6f747b679d27f904 (patch)
tree085c8c6855085b391efce598647f0ce211d1eb2f
parent0b8c20e7ddce7cf791447f15be540ee2d0a6bfb2 (diff)
downloadandroid_external_sepolicy-070c01f8f133dfc0da82beca6f747b679d27f904.tar.gz
android_external_sepolicy-070c01f8f133dfc0da82beca6f747b679d27f904.tar.bz2
android_external_sepolicy-070c01f8f133dfc0da82beca6f747b679d27f904.zip
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
-rwxr-xr-xtools/insertkeys.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/insertkeys.py b/tools/insertkeys.py
index e0eee8d..7237d6f 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