dabo Commit
Revision 4714
Date: 2008-11-25 11:10:45 -0800 (Tue, 25 Nov 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/4714

Changed:
U   trunk/dabo/dApp.py

Log:
dApp wasn't allowing the setting of a custom Crypto instance in initProperties,
because it was reinitializing self._cryptoProvider to None *after* the custom
Crypto was already set by the user. Fixed, by taking away the unneeded 
assignment in __init__, and adding a getattr() wrapper in _getCrypto().



Diff:
Modified: trunk/dabo/dApp.py
===================================================================
--- trunk/dabo/dApp.py  2008-11-24 03:59:01 UTC (rev 4713)
+++ trunk/dabo/dApp.py  2008-11-25 19:10:45 UTC (rev 4714)
@@ -182,7 +182,6 @@
                # initially. The default behavior is for it to be shown, as 
usual.
                self.showMainFormOnStart = True
                self._wasSetup = False
-               self._cryptoProvider = None
                # Track names of menus whose MRUs need to be persisted. Set
                # the key for each entry to the menu caption, and the value to
                # the bound function.
@@ -1213,7 +1212,7 @@
 
 
        def _getCrypto(self):
-               if self._cryptoProvider is None:
+               if getattr(self, "_cryptoProvider", None) is None:
                        # Use the default crypto
                        self._cryptoProvider = SimpleCrypt()
                return self._cryptoProvider




_______________________________________________
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]

Reply via email to