From d38d865c7c0cb0a909f5549d109ec21afbab064c Mon Sep 17 00:00:00 2001 From: Sascha Silbe Date: Tue, 09 Mar 2010 23:28:18 +0000 Subject: Revert "Merge commit 'refs/top-bases/t/bug-1568' into t/bug-1568" This reverts commit 12016d54088c8bbd0b48b33e591ffab94875360b, reversing changes made to d006092d37b180bb0490ab7e1182662afc5ae5cf. --- diff --git a/.topdeps b/.topdeps deleted file mode 100644 index 9c9ac90..0000000 --- a/.topdeps +++ /dev/null @@ -1 +0,0 @@ -upstream/master diff --git a/.topmsg b/.topmsg deleted file mode 100644 index 3c90ef8..0000000 --- a/.topmsg +++ /dev/null @@ -1,7 +0,0 @@ -From: Sascha Silbe -Subject: [PATCH] check syntax of private key (#1568) - -Check that header and footer of the private key are present in order to detect -corrupted key files. - -Signed-off-by: Sascha Silbe diff --git a/src/sugar/profile.py b/src/sugar/profile.py index 3f93bba..3ea1e67 100644 --- a/src/sugar/profile.py +++ b/src/sugar/profile.py @@ -105,18 +105,14 @@ class Profile(object): return None key = "" - begin_found = False - end_found = False for l in lines: l = l.strip() if l.startswith("-----BEGIN DSA PRIVATE KEY-----"): - begin_found = True continue if l.startswith("-----END DSA PRIVATE KEY-----"): - end_found = True continue key += l - if not (len(key) and begin_found and end_found): + if not len(key): logging.error("Error parsing public key.") return None -- cgit v0.9.1