[Pkg-puppet-devel] [facter] 320/352: (maint) Return nil on sysctl command lookup fail
Stig Sandbeck Mathisen
ssm at debian.org
Sun Apr 6 22:21:57 UTC 2014
This is an automated email from the git hooks/post-receive script.
ssm pushed a commit to branch master
in repository facter.
commit cf899a357175a482c89b53fa3cf9ca79e5338927
Author: Adrien Thebo <git at somethingsinistral.net>
Date: Mon Mar 10 12:35:43 2014 -0700
(maint) Return nil on sysctl command lookup fail
See also 7fc668519f8e.
---
lib/facter/util/uptime.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/facter/util/uptime.rb b/lib/facter/util/uptime.rb
index 4df1cb0..7f74c2f 100644
--- a/lib/facter/util/uptime.rb
+++ b/lib/facter/util/uptime.rb
@@ -28,7 +28,7 @@ module Facter::Util::Uptime
end
def self.uptime_sysctl
- output = Facter::Core::Execution.exec("#{uptime_sysctl_cmd} 2>/dev/null")
+ output = Facter::Core::Execution.exec("#{uptime_sysctl_cmd} 2>/dev/null", :on_fail => nil)
if not output.empty?
compute_uptime(Time.at(output.match(/\d+/)[0].to_i))
end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git
More information about the Pkg-puppet-devel
mailing list