Utilities/__init__.py

changeset 832
eb5ff61f927b
parent 805
83ca4d1ff648
child 882
34b86be88bf0
--- a/Utilities/__init__.py	Sun Jan 09 14:25:16 2011 +0100
+++ b/Utilities/__init__.py	Sun Jan 09 18:16:46 2011 +0100
@@ -453,7 +453,10 @@
     @return dictionary of string, boolean, complex, float and int
     """
     flags = {}
-    lines = text.splitlines()
+    if isinstance(text, str):
+        lines = text.splitlines()
+    else:
+        lines = text
     for line in reversed(lines):
         index = line.find("eflag:")
         if index == -1:

eric ide

mercurial