1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 00:28:20 +08:00

Add: Replace user filepath with "C:\fakepath" in error logs

This commit is contained in:
LmeSzinc
2020-07-01 02:56:10 +08:00
parent 8a3d8a8ada
commit 4ca076dd05
2 changed files with 20 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
import re
from PIL import Image
from module.ui.page import *
@@ -32,3 +34,19 @@ def handle_sensitive_image(image):
return put_image_mask(image, mask='MASK_MAIN')
return image
def handle_sensitive_text(text):
"""
Args:
text (str):
Returns:
str:
"""
text = re.sub('File \"(.*?)AzurLaneAutoScript', 'File \"C:\\\\fakepath\\\\AzurLaneAutoScript', text)
return text
def handle_sensitive_logs(logs):
return [handle_sensitive_text(line) for line in logs]