(self, domain, docBase)
| 1607 | |
| 1608 | # 获取指定虚拟主机 |
| 1609 | def Set_Domain_path(self, domain, docBase): |
| 1610 | try: |
| 1611 | Hosts = self.__ENGINE.getchildren() |
| 1612 | except: |
| 1613 | Hosts = list(self.__ENGINE) |
| 1614 | flag = False |
| 1615 | for host in Hosts: |
| 1616 | if host.tag != 'Host': continue |
| 1617 | if host.attrib['name'] == domain: |
| 1618 | try: |
| 1619 | ch = host.getchildren() |
| 1620 | except: |
| 1621 | ch = list(host) |
| 1622 | for i in ch: |
| 1623 | print(i.attrib) |
| 1624 | if 'docBase' in i.attrib: |
| 1625 | i.attrib['docBase'] = docBase |
| 1626 | flag = True |
| 1627 | if flag: |
| 1628 | self.save_tomcat() |
| 1629 | return True |
| 1630 | return False |
| 1631 | |
| 1632 | def TomcatSetPath(self, port): |
| 1633 | ''' |
no test coverage detected