Esempio n. 1
0
 def __init__(self):
     component_list = FindFiles.find_files(self.location_to_search,
                                           self.file_type)
     self.found_manifest_version = []
     self.get_version_from_manifest(component_list)
     self.file_type = "*.jar"
     self.get_version_from_manifest(component_list)
Esempio n. 2
0
 def get_tomcat_version(self, tomcat_version_script):
     for tomcat_instance in FindFiles.find_files(GENERIC_BINARY_LOCATION, tomcat_version_script):
         version_script = ErrorHelper.identify_problem(tomcat_instance, "tomcat")
         found_tomcat_version = version_script.split()[27]
         tomcat_location = version_script.split()[2].split("/")[-1]
         addme = tomcat_location + ": " + found_tomcat_version + "; "
         self.all_tomcat_versions.append(addme)
     self.all_tomcat_versions.append(",")
Esempio n. 3
0
 def get_tomcat_version(self, tomcat_version_script):
     for tomcat_instance in FindFiles.find_files(GENERIC_BINARY_LOCATION,
                                                 tomcat_version_script):
         version_script = ErrorHelper.identify_problem(
             tomcat_instance, "tomcat")
         found_tomcat_version = version_script.split()[27]
         tomcat_location = version_script.split()[2].split("/")[-1]
         addme = tomcat_location + ": " + found_tomcat_version + "; "
         self.all_tomcat_versions.append(addme)
     self.all_tomcat_versions.append(",")
Esempio n. 4
0
 def get_java_version(self):
     for java_version in FindFiles.find_files(JAVA_BINARY_LOCATION, "java"):
         if os.path.islink(os.path.basename(java_version)):
             pass
         else:
             if "gcj" in java_version or "gij" in java_version:
                 found_java_version = subprocess.Popen([java_version, '--version'],
                                                       stdout=subprocess.PIPE, stdin=subprocess.PIPE,
                                                       stderr=subprocess.PIPE).stdout.read().split()[2]
             else:
                 found_java_version = subprocess.Popen([java_version, '-version'],
                                                       stdout=subprocess.PIPE, stdin=subprocess.PIPE,
                                                       stderr=subprocess.PIPE).stderr.read().split()[2]
             append_me = java_version + ": " + found_java_version
             self.java_version_list.append(append_me)
     self.java_version_list.append(" ,")
     return(self.java_version_list)
Esempio n. 5
0
 def get_java_version(self):
     for java_version in FindFiles.find_files(JAVA_BINARY_LOCATION, "java"):
         if os.path.islink(os.path.basename(java_version)):
             pass
         else:
             if "gcj" in java_version or "gij" in java_version:
                 found_java_version = subprocess.Popen(
                     [java_version, '--version'],
                     stdout=subprocess.PIPE,
                     stdin=subprocess.PIPE,
                     stderr=subprocess.PIPE).stdout.read().split()[2]
             else:
                 found_java_version = subprocess.Popen(
                     [java_version, '-version'],
                     stdout=subprocess.PIPE,
                     stdin=subprocess.PIPE,
                     stderr=subprocess.PIPE).stderr.read().split()[2]
             append_me = java_version + ": " + found_java_version
             self.java_version_list.append(append_me)
     self.java_version_list.append(" ,")
     return (self.java_version_list)
Esempio n. 6
0
 def __init__(self):
     component_list = FindFiles.find_files(self.location_to_search, self.file_type)
     self.found_manifest_version = []
     self.get_version_from_manifest(component_list)
     self.file_type = "*.jar"
     self.get_version_from_manifest(component_list)