From 34a152dc76bc88fac137802312cc454b99af35b3 Mon Sep 17 00:00:00 2001 From: h00die Date: Fri, 31 Mar 2017 16:15:16 -0400 Subject: [PATCH] handle no sysinfo from ssh_login --- modules/post/multi/gather/tomcat_gather.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/post/multi/gather/tomcat_gather.rb b/modules/post/multi/gather/tomcat_gather.rb index 98bdc11aea1f..fbcaaa355e40 100644 --- a/modules/post/multi/gather/tomcat_gather.rb +++ b/modules/post/multi/gather/tomcat_gather.rb @@ -180,10 +180,14 @@ def gathernix end def run - if sysinfo['OS'].include? "Windows" - gatherwin + if sysinfo + if sysinfo['OS'].include? "Windows" + gatherwin + else + gathernix + end else - gathernix + print_error('Incompatible session type, sysinfo is not available.') end if $username.size == 0