Skip to content

Check that we have results before returning a value#238

Merged
shivapoudel merged 1 commit into
voxpupuli:masterfrom
zachfi:python3factfix
Sep 7, 2015
Merged

Check that we have results before returning a value#238
shivapoudel merged 1 commit into
voxpupuli:masterfrom
zachfi:python3factfix

Conversation

@zachfi
Copy link
Copy Markdown
Contributor

@zachfi zachfi commented Sep 7, 2015

Without this change, empty results yield a message like the following in
Facter output.

undefined method `[]' for nil:NilClass

This work captures the results and check to them to ensure we return
a valid value.

Without this change, empty results yield a message like the following in
Facter output.

  undefined method `[]' for nil:NilClass

This work captures the results and check to them to ensure we return
a valid value.
shivapoudel pushed a commit that referenced this pull request Sep 7, 2015
Check that we have results before returning a value
@shivapoudel shivapoudel merged commit 676f705 into voxpupuli:master Sep 7, 2015
@shivapoudel
Copy link
Copy Markdown
Contributor

Cool!

@zachfi zachfi deleted the python3factfix branch September 7, 2015 19:42
@zachfi
Copy link
Copy Markdown
Contributor Author

zachfi commented Sep 7, 2015

Thanks!

@zachfi
Copy link
Copy Markdown
Contributor Author

zachfi commented Sep 7, 2015

More to come if you're open to it.

@shivapoudel
Copy link
Copy Markdown
Contributor

xD

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.

2 participants