Blob Blame History Raw
index 18b0a9f9c7..6faf95e569 100644
--- a/Bio/Nexus/Nexus.py
+++ b/Bio/Nexus/Nexus.py
@@ -444,6 +444,8 @@ def _kill_comments_and_break_lines(text):
 
     NOTE: this function is very slow for large files, and obsolete when using C extension cnexus
     """
+    if not text:
+        return ""
     contents = iter(text)
     newtext = []
     newline = []