示例#1
0
def redirect_to_dump():
    path = os.path.join(Platform.getUserSessionDir(), "dump.txt")
    try:
        dirname = os.path.dirname(path)
        if not os.path.exists(dirname):
            os.makedirs(dirname)

        buf = file(path, "a", 0)
    except IOError, err:
        return
示例#2
0
def redirect_to_dump():
	path = os.path.join(Platform.getUserSessionDir(), "dump.txt")
	try:
		dirname = os.path.dirname(path)
		if not os.path.exists(dirname):
			os.makedirs(dirname)
		
		buf = file(path, "a", 0)
	except IOError, err:
		return
示例#3
0
def redirect_to_dump(purge = True):
	path = os.path.join(Platform.getUserSessionDir(), "dump.txt")
	try:
		dirname = os.path.dirname(path)
		if not os.path.exists(dirname):
			os.makedirs(dirname)
		
		if purge is True:
			mode = "w"
		else:
			mode = "a"
		
		buf = file(path, mode, 0)
	except IOError, err:
		return