pull/632/head
Mr Chen 5 months ago
parent f50be939f5
commit d75c729e29
  1. 2
      plugins/gdrive/class/gdriveclient.py
  2. 2
      plugins/lvs/index.py
  3. 4
      plugins/php-yum/index.py
  4. 2
      plugins/system_safe/system_safe.py

@ -215,7 +215,7 @@ class gdriveclient():
print("data_type 类型错误!!!")
exit(1)
file_regx = prefix_dict.get(data_type) + "_(.+)_20\d+_\d+\."
file_regx = prefix_dict.get(data_type) + r"_(.+)_20\d+_\d+\."
sub_search = re.search(file_regx.lower(), file_name)
sub_path_name = ""
if sub_search:

@ -154,7 +154,7 @@ def initdUinstall():
def runLog():
path = getConf()
content = mw.readFile(path)
rep = 'log\s*=\s*(.*)'
rep = r'log\s*=\s*(.*)'
tmp = re.search(rep, content)
return tmp.groups()[0]

@ -307,7 +307,7 @@ def getPhpConf(version):
phpini = mw.readFile(getConf(version))
result = []
for g in gets:
rep = g['name'] + '\s*=\s*([0-9A-Za-z_& ~]+)(\s*;?|\r?\n)'
rep = g['name'] + r'\s*=\s*([0-9A-Za-z_& ~]+)(\s*;?|\r?\n)'
tmp = re.search(rep, phpini)
if not tmp:
continue
@ -326,7 +326,7 @@ def submitPhpConf(version):
phpini = mw.readFile(filename)
for g in gets:
if g in args:
rep = g + '\s*=\s*(.+)\r?\n'
rep = g + r'\s*=\s*(.+)\r?\n'
val = g + ' = ' + args[g] + '\n'
phpini = re.sub(rep, val, phpini)
mw.writeFile(filename, phpini)

@ -578,7 +578,7 @@ class App:
# 转换时间格式
def __to_date(self, date_str):
tmp = re.split('\s+', date_str)
tmp = re.split(r'\s+', date_str)
s_date = str(datetime.now().year) + '-' + \
self.__months.get(tmp[0]) + '-' + tmp[1] + ' ' + tmp[2]
time_array = time.strptime(s_date, "%Y-%m-%d %H:%M:%S")

Loading…
Cancel
Save