Revision: 1382
Author: sebastien.lelong
Date: Thu Oct 8 00:55:26 2009
Log: fix reindeint on win/os2 platform
http://code.google.com/p/jallib/source/detail?r=1382
Modified:
/trunk/tools/jallib.py
=======================================
--- /trunk/tools/jallib.py Tue Oct 6 22:35:44 2009
+++ /trunk/tools/jallib.py Thu Oct 8 00:55:26 2009
@@ -720,8 +720,8 @@
assert level == 0, "Reached the end of file, but indent level is not
null (it should)"
# ok, now we can save the content back to the file
- fout = file(filename,"w")
- print >> fout, os.linesep.join(content)
+ fout = file(filename,"wb")
+ fout.write(os.linesep.join(content) + os.linesep) # linefeed on last
line
fout.close()
def do_reindent(args):
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---