OSDN Git Service

Fix broken circular import.
authorJames Teh <jamie@jantrid.net>
Wed, 6 Oct 2010 23:20:47 +0000 (09:20 +1000)
committerJames Teh <jamie@jantrid.net>
Wed, 6 Oct 2010 23:20:47 +0000 (09:20 +1000)
source/baseObject.py

index 8ac08e9..6386efe 100755 (executable)
@@ -8,7 +8,6 @@
 """\r
 \r
 import weakref\r
-import inputCore\r
 from logHandler import log\r
 \r
 class Getter(object):\r
@@ -148,6 +147,8 @@ class ScriptableObject(AutoPropertyObject):
                func = getattr(self, "script_%s" % scriptName, None)\r
                if not func:\r
                        raise LookupError("No such script: %s" % func)\r
+               # Import late to avoid circular import.\r
+               import inputCore\r
                self._gestureMap[inputCore.normalizeGestureIdentifier(gestureIdentifier)] = func\r
 \r
        def bindGestures(self, gestureMap):\r