@name 获取操作系统版本的安装命令 @author lkq<2021-08-25> @param get @return string
(self, get)
| 81 | return type(get.domains) |
| 82 | |
| 83 | def get_os_version(self, get): |
| 84 | """ |
| 85 | @name 获取操作系统版本的安装命令 |
| 86 | @author lkq<2021-08-25> |
| 87 | @param get<dict_obj> |
| 88 | @return string |
| 89 | """ |
| 90 | # 获取Centos |
| 91 | if os.path.exists('/usr/bin/yum') and os.path.exists('/etc/yum.conf'): |
| 92 | return 'Centos' |
| 93 | # 获取Ubuntu |
| 94 | if os.path.exists('/usr/bin/apt-get') and os.path.exists('/usr/bin/dpkg'): |
| 95 | return 'Ubuntu' |
| 96 | return 'Unknown' |
| 97 | |
| 98 | def get_jdk_version(self, get): |
| 99 | ''' |
no test coverage detected