Commits

and...@69d324d9-c39d-4fdc-8679-7745eae9e2c8  committed ceaeb73

Further fix for #122; don't double linebreaks.

  • Participants
  • Parent commits 4485a49

Comments (0)

Files changed (1)

File south/modelsparser.py

 
 def get_model_tree(model):
     # Get the source of the model's file
-    source = open(inspect.getsourcefile(model)).read().replace("\r","\n") + "\n"
+    source = open(inspect.getsourcefile(model)).read().replace("\r\n", "\n").replace("\r","\n") + "\n"
     tree = STTree(parser.suite(source).totuple())
     # Now, we have to find it
     for poss in tree.find("compound_stmt"):