1. Andrew Godwin
  2. south

Commits

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

Fix #122 - \r being bastards.

  • Participants
  • Parent commits 120f693
  • Branches default

Comments (0)

Files changed (1)

File south/modelsparser.py

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