On 01/02/2012 04:30 PM, Michael Calmer wrote:
Hi,

happy new year.

I have attached two small patches to imporove the SUSE client support.

The first one is a general workaround for a not installed yum.
Currently the classes are only defined if platform is "deb", but also on SUSE
with zypp plugin, yum is not installed.
Additionally it fixes some python errors in the original code. You cannot
assign a class which is defined later.

The second one is a small patch to check for the zypp plugin and hide the
warning about the not installed yum plugin.

Second patch commited.

I had mental problem with first patch. I do not like replacing 'if' by 'try/except'. This cover *why* we are doing that. Putting comment after that except saying that "debian and suse do not have this class..." would be most easier fix.
But I would most rather see there
  if getPlatform() == 'deb' or isThisSuse():

BTW, how behaves zypper? If spacewalk code raise error, what is zypper behavior? Yum will print nice error message, if that raised error is instance of YumBaseError. If not, then yum will print full traceback.
Does have zypper similar behaviour?

--
Miroslav Suchy
Red Hat Satellite Engineering

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to