Update mw.py

pull/202/head
midoks 3 years ago
parent 4a66b76963
commit cf863662e0
  1. 12
      class/core/mw.py

@ -418,6 +418,18 @@ def backFile(self, file, act=None):
execShell("/usr/bin/cp -p {0} {1}".format(file, file + file_type)) execShell("/usr/bin/cp -p {0} {1}".format(file, file + file_type))
def restoreFile(self, file, act=None):
"""
@name 还原配置文件
@param file 需要还原的文件
@param act 如果存在则还原默认配置
"""
file_type = "_bak"
if act:
file_type = "_def"
execShell("/usr/bin/cp -p {1} {0}".format(file, file + file_type))
def HttpGet(url, timeout=10): def HttpGet(url, timeout=10):
""" """
发送GET请求 发送GET请求

Loading…
Cancel
Save