diff --git a/diceware/wordlist.py b/diceware/wordlist.py
index eb41f94e2906ab62cf3c335a3e04fa1bc2ac6aeb..1bc32a7edbc09ca773eb3ca36adbaf6de767bdd3 100644
--- a/diceware/wordlist.py
+++ b/diceware/wordlist.py
@@ -111,12 +111,11 @@ def get_signed_wordlist(file_descriptor):
         # wait for first empty line
         pass
     for line in file_descriptor.readlines():
-        line = line.strip()
-        if line == '-----BEGIN PGP SIGNATURE-----':
-            break
         line = refine_wordlist_entry(line, signed=True)
         if not line:
             continue
+        elif line == '-----BEGIN PGP SIGNATURE-----':
+            break
         result += [line, ]
     file_descriptor.close()
     return result