Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent Facter error when packages not installed #60

Merged
merged 1 commit into from
Feb 26, 2014

Conversation

hakamadare
Copy link
Contributor

on RHEL systems, pkg.retrieve[pkg.property(:ensure)] returns :absent
when a package is not installed; this can generate an unsightly error
when running these facts on a RHEL system where the necessary OS
packages are not installed:

[root@gepeto ~]# facter -p osfamily
RedHat
[root@gepeto ~]# facter -p lsbmajdistrelease
5
[root@gepeto ~]# grep version /etc/puppet/modules/python/Modulefile
version      '1.6.3'
[root@gepeto ~]# facter -p virtualenv_version pip_version
Could not retrieve virtualenv_version: can't convert Symbol into String
Could not retrieve pip_version: undefined method `[]' for nil:NilClass
Could not retrieve pip_version: can't convert Symbol into String
pip_version =>
virtualenv_version =>

Fixes #50

on RHEL systems, `pkg.retrieve[pkg.property(:ensure)]` returns `:absent`
when a package is not installed; this can generate an unsightly error
when running these facts on a RHEL system where the necessary OS
packages are not installed:

    [root@gepeto ~]# facter -p osfamily
    RedHat
    [root@gepeto ~]# facter -p lsbmajdistrelease
    5
    [root@gepeto ~]# grep version /etc/puppet/modules/python/Modulefile
    version      '1.6.3'
    [root@gepeto ~]# facter -p virtualenv_version pip_version
    Could not retrieve virtualenv_version: can't convert Symbol into String
    Could not retrieve pip_version: undefined method `[]' for nil:NilClass
    Could not retrieve pip_version: can't convert Symbol into String
    pip_version =>
    virtualenv_version =>

Fixes voxpupuli#50
stankevich added a commit that referenced this pull request Feb 26, 2014
prevent Facter error when packages not installed
@stankevich stankevich merged commit 0277b9c into voxpupuli:master Feb 26, 2014
@tschellenbach
Copy link

This issue is still present in the master branch of this repo.

stankevich added a commit that referenced this pull request Sep 1, 2015
prevent Facter error when packages not installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

If virtualenv isn't installed, it isn't properly detected or installed.
3 participants