Issue #1354 has been updated by ohookins.
Can't you just wrap the import in a try/except :
try:
import yum
except ImportError:
blah
where "blah" is returning something meaningful to yum.rb
----------------------------------------
Bug #1354: yum provider problems with RHEL 3
http://projects.reductivelabs.com/issues/show/1354
Author: digant
Status: Accepted
Priority: Normal
Assigned to: community
Category: Red Hat
Target version:
Complexity: Unknown
Patch: None
Affected version:
Keywords:
When using the yum provider with RHEL 3, the following error occurs.
<pre>
[0;32minfo: Retrieving plugins [0m
[0;31mnotice: Ignoring cache [0m
[0;32minfo: Caching catalog at /var/lib/puppet/localconfig.yaml [0m
[0;31mnotice: Starting catalog run [0m
/usr/lib/site_ruby/1.8/puppet/util.rb:374:in `execute'
/usr/lib/site_ruby/1.8/puppet/provider.rb:138:in `python'
/usr/lib/site_ruby/1.8/puppet/provider.rb:127:in `python'
/usr/lib/site_ruby/1.8/puppet/provider/package/yum.rb:32:in `prefetch'
/usr/lib/site_ruby/1.8/puppet/transaction.rb:490:in `prefetch'
/usr/lib/site_ruby/1.8/puppet/transaction.rb:487:in `each'
/usr/lib/site_ruby/1.8/puppet/transaction.rb:487:in `prefetch'
/usr/lib/site_ruby/1.8/puppet/transaction.rb:502:in `prepare'
/usr/lib/site_ruby/1.8/puppet/transaction.rb:299:in `evaluate'
/usr/lib/site_ruby/1.8/puppet/node/catalog.rb:118:in `apply'
/usr/lib/site_ruby/1.8/puppet/network/client/master.rb:264:in `run'
/usr/lib/site_ruby/1.8/puppet/network/client/master.rb:263:in `benchmark'
/usr/lib/site_ruby/1.8/puppet/util.rb:211:in `measure'
/usr/lib/ruby/1.8/benchmark.rb:342:in `realtime'
/usr/lib/site_ruby/1.8/puppet/util.rb:211:in `benchmark'
/usr/lib/site_ruby/1.8/puppet/network/client/master.rb:263:in `run'
/usr/lib/site_ruby/1.8/puppet/network/client/master.rb:245:in `synchronize'
/usr/lib/site_ruby/1.8/puppet/network/client/master.rb:245:in `run'
/usr/sbin/puppetd:439
[0;33merr: Could not prefetch package provider 'yum': Execution of
'/usr/bin/python /usr/lib/site_ruby/1.8/puppet/provider/package/yumhelper.py'
returned 256: Traceback (most recent call last):
File "/usr/lib/site_ruby/1.8/puppet/provider/package/yumhelper.py", line 7,
in ?
import yum
ImportError: No module named yum
[0m
[0;32minfo: Sent transaction report in 0.45 seconds [0m
[0;31mnotice: Finished catalog run in 11.16 seconds [0m
</pre>
----------------------------------------
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://reductivelabs.com/redmine/my/account
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---