Blob Blame History Raw
--- ./migrate/versioning/util/__init__.py.orig	2009-06-01 09:52:25.000000000 -0400
+++ ./migrate/versioning/util/__init__.py	2009-06-01 09:53:23.000000000 -0400
@@ -6,7 +6,12 @@
     if isinstance(model, basestring):
         varname = model.split('.')[-1]
         modules = '.'.join(model.split('.')[:-1])
-        module = __import__(modules, globals(), {}, ['dummy-not-used'], -1)
+        try:
+            module = __import__(modules, globals(), {}, ['dummy-not-used'], -1)
+        except TypeError:
+            # The level argument doesn't exist in Python 2.4 and lower
+            module = __import__(modules, globals(), {}, ['dummy-not-used'])
+
         return getattr(module, varname)
     else:
         # Assume it's already loaded.