dabo Commit
Revision 4360
Date: 2008-08-06 08:59:39 -0700 (Wed, 06 Aug 2008)
Author: Nate
Trac: http://svn.dabodev.com/trac/dabo/changeset/4360
Changed:
U trunk/ide/ClassDesigner.py
Log:
Fixed a subtle bug on windows when managing imports for a class. I got a
SyntaxError whenever I tried to import more than one line.
Well, turns out that the compile function really likes to see just newline
characters. So, I have the code all the windows eol characters with unix eols
and everything is fixed.
Diff:
Modified: trunk/ide/ClassDesigner.py
===================================================================
--- trunk/ide/ClassDesigner.py 2008-08-04 20:08:01 UTC (rev 4359)
+++ trunk/ide/ClassDesigner.py 2008-08-06 15:59:39 UTC (rev 4360)
@@ -1162,7 +1162,7 @@
# Check the syntax before storing
txt = dlg.edtImport.Text
try:
- compile(txt.strip(), "", "exec")
+ compile(txt.strip().replace("\r\n",
"\n"), "", "exec")
self._classImportDict[frm] = txt
showDialog = dlg.Accepted = False
except SyntaxError, e:
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]