On Mon, Jul 09, 2007 at 10:35:53AM -0700, Greg Swallow wrote: > Tim Lauridsen wrote: > > This should do the tricks. > > from yum.plugins import TYPE_INTERACTIVE, TYPE_CORE, API_VERSION, > TYPE_INTERFACE > > plugin_type = (API_VERSION <= 2.3 and TYPE_INTERFACE or TYPE_INTERACTIVE, > > TYPE_CORE) > > No luck...When using yum 2.4 (yum-2.4.3-4.el4.centos) I still get the error: > > "ImportError: cannot import name TYPE_INTERACTIVE"
You can trivially wrap each import in a try: ... except ImportError:... Import the new names, and on import error, fall back to the old names. -- Michael _______________________________________________ Yum-devel mailing list [email protected] https://lists.dulug.duke.edu/mailman/listinfo/yum-devel
