dabo Commit
Revision 3786
Date: 2007-12-11 08:09:17 -0800 (Tue, 11 Dec 2007)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/3786

Changed:
U   trunk/dabo/dApp.py

Log:
This fixes a bug I introduced when _initModuleNames() was added. People running 
Python 2.4 or earlier would lose their module references in the app object, 
causing the app to fail to find its main form. Reported by Lukasz Szybalski.



Diff:
Modified: trunk/dabo/dApp.py
===================================================================
--- trunk/dabo/dApp.py  2007-12-11 15:21:02 UTC (rev 3785)
+++ trunk/dabo/dApp.py  2007-12-11 16:09:17 UTC (rev 3786)
@@ -691,13 +691,14 @@
                if not currdir in sys.path:
                        sys.path.insert(0, currdir)
                for dd in ("biz", "db", "ui", "resources", "reports"):
+                       currmod = getattr(self, dd, None)
                        if sys.version.split()[0].split(".") >= ["2", "5"]:
                                try:
                                        self.__setattr__(dd, __import__(dd, 
globals(), locals(), [], 0))
                                except ImportError:
-                                       self.__setattr__(dd, None)
+                                       self.__setattr__(dd, currmod)
                        else:
-                               self.__setattr__(dd, None)
+                               self.__setattr__(dd, currmod)
                sys.path = currsyspath
 
 




_______________________________________________
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/dabo-dev/[EMAIL PROTECTED]

Reply via email to