Author: dmeyer
Date: Sun Mar  2 12:02:15 2008
New Revision: 3150

Log:
rename importhelper to sysimport

Modified:
   trunk/base/src/notifier/gobject.py
   trunk/base/src/notifier/thread.py
   trunk/base/src/utils.py

Modified: trunk/base/src/notifier/gobject.py
==============================================================================
--- trunk/base/src/notifier/gobject.py  (original)
+++ trunk/base/src/notifier/gobject.py  Sun Mar  2 12:02:15 2008
@@ -45,10 +45,10 @@
 
 # get import helper since this file conflicts with the
 # global gobject module.
-from kaa.utils import importhelper
+from kaa.utils import sysimport
 try:
     # try to import gobject
-    gobject = importhelper('gobject')
+    gobject = sysimport('gobject')
 except ImportError:
     gobject = None
     

Modified: trunk/base/src/notifier/thread.py
==============================================================================
--- trunk/base/src/notifier/thread.py   (original)
+++ trunk/base/src/notifier/thread.py   Sun Mar  2 12:02:15 2008
@@ -67,8 +67,8 @@
 from async import InProgress
 
 # import python thread file
-from kaa.utils import importhelper
-thread = importhelper('thread')
+from kaa.utils import sysimport
+LockType = sysimport('thread').LockType
 
 # get logging object
 log = logging.getLogger('notifier')
@@ -143,7 +143,7 @@
             # decorator in classes
             self._lock = None
             return
-        if isinstance(obj, (threading._RLock, thread.LockType)):
+        if isinstance(obj, (threading._RLock, LockType)):
             # decorator from functions
             self._lock = obj
             return

Modified: trunk/base/src/utils.py
==============================================================================
--- trunk/base/src/utils.py     (original)
+++ trunk/base/src/utils.py     Sun Mar  2 12:02:15 2008
@@ -284,10 +284,10 @@
         return self._add_doc(property(fget, self.fset, self.fdel), 
fget.__doc__ or self.fget.__doc__)
 
 
-def importhelper(name):
+def sysimport(name):
     """
     Help to import modules with name conflict. E.g. thread.py in notifier
-    uses importhelper('thread').
+    uses sysimport('thread').
     """
     # Fast path: see if the module has already been imported.
     try:

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to