update outputpath

This commit is contained in:
zhulixin 2018-09-04 14:54:51 +08:00
parent b7b34c1b8e
commit 69fa37aa95
5 changed files with 269 additions and 252 deletions

View File

@ -3,7 +3,11 @@
import re import re
import sys, getopt import sys, getopt
import subprocess import subprocess
import os
PATH = lambda p: os.path.abspath(
os.path.join(os.path.dirname(__file__), p)
)
def getUUID(text): def getUUID(text):
uuid = re.findall('<(.*)>', text)[0].upper() uuid = re.findall('<(.*)>', text)[0].upper()
@ -24,8 +28,11 @@ def analyzeCrashLog(inputfile, outputfile):
path = "'" + path + "'" path = "'" + path + "'"
print(path) print(path)
analysisPath = PATH("../iOSCrashAnalysis/")
outname = os.path.splitext(inputfile)[0]
ttt = subprocess.getoutput( ttt = subprocess.getoutput(
'/Users/zhulixin/Desktop/CrashAnalysis/symbolicatecrash ' + inputfile + ' -d ' + path + ' -o XiaoYing-IOS-Crash.crash') analysisPath + '/symbolicatecrash ' + inputfile + ' -d ' + path + ' -o ' + outname + '.crash')
print(ttt) print(ttt)

View File

@ -33,6 +33,16 @@ class FileFilt:
self.fileList.append(newDir) self.fileList.append(newDir)
self.counter += 1 self.counter += 1
def DelFolder(self, delDir):
delList = os.listdir(delDir)
for f in delList:
filePath = os.path.join(delDir, f)
if os.path.isfile(filePath):
os.remove(filePath)
print(filePath + " was removed!")
elif os.path.isdir(filePath):
shutil.rmtree(filePath, True)
print("Directory: " + filePath + " was removed!")
if __name__ == "__main__": if __name__ == "__main__":
pass pass

File diff suppressed because it is too large Load Diff