(data, filePath)
| 1051 | |
| 1052 | @staticmethod |
| 1053 | def SaveFile(data, filePath): |
| 1054 | if not data: |
| 1055 | return |
| 1056 | if not filePath: |
| 1057 | return |
| 1058 | |
| 1059 | try: |
| 1060 | fileDir = os.path.dirname(filePath) |
| 1061 | |
| 1062 | if not os.path.isdir(fileDir): |
| 1063 | os.makedirs(fileDir) |
| 1064 | |
| 1065 | with open(filePath, "wb+") as f: |
| 1066 | f.write(data) |
| 1067 | |
| 1068 | Log.Debug("add chat cache, cachePath:{}".format(filePath)) |
| 1069 | |
| 1070 | except Exception as es: |
| 1071 | Log.Error(es) |
| 1072 | |
| 1073 | @staticmethod |
| 1074 | def GetComicInfoXml(epsId, picNum, bookInfo): |