Re: [Yum-devel] protect-packages plugin - compatibility with yum 2.4

2007-07-10 Thread Tim Lauridsen
Greg Swallow wrote: Michael E Brown wrote: On Mon, Jul 09, 2007 at 10:35:53AM -0700, Greg Swallow wrote: 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

RE: [Yum-devel] protect-packages plugin - compatibility with yum 2.4

2007-07-10 Thread Greg Swallow
Tim Lauridsen wrote: It will work, but i like the attached patch better, please try it out. Your patch doesn't work for me. It still gives an ImportError as apparently it tries to process the else statement even though you'd think it wouldn't. Greg

RE: [Yum-devel] protect-packages plugin - compatibility with yum 2.4

2007-07-09 Thread Greg Swallow
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

Re: [Yum-devel] protect-packages plugin - compatibility with yum 2.4

2007-07-09 Thread Michael E Brown
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,

RE: [Yum-devel] protect-packages plugin - compatibility with yum 2.4

2007-07-09 Thread Greg Swallow
Michael E Brown wrote: On Mon, Jul 09, 2007 at 10:35:53AM -0700, Greg Swallow wrote: 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:...

Re: [Yum-devel] protect-packages plugin - compatibility with yum 2.4

2007-07-07 Thread Tim Lauridsen
Greg Swallow wrote: I got the protect-packages plugin to work with yum 2.4 in EL4 by renaming the two instances of TYPE_INTERACTIVE to TYPE_INTERFACE and changing requires_api_version = '2.4' to requires_api_version = '2.1'. It seems to work fine like that. Just wondering if there is a way to

[Yum-devel] protect-packages plugin - compatibility with yum 2.4

2007-07-06 Thread Greg Swallow
I got the protect-packages plugin to work with yum 2.4 in EL4 by renaming the two instances of TYPE_INTERACTIVE to TYPE_INTERFACE and changing requires_api_version = '2.4' to requires_api_version = '2.1'. It seems to work fine like that. Just wondering if there is a way to change it to work with