MCPcopy
hub / github.com/tonquer/JMComic-qt / ParseFromData

Method ParseFromData

src/tools/tool.py:62–71  ·  view source on GitHub ↗
(desc, src)

Source from the content-addressed store, hash-verified

60
61 @staticmethod
62 def ParseFromData(desc, src):
63 try:
64 if not src:
65 return
66 if isinstance(src, str):
67 src = json.loads(src)
68 for k, v in src.items():
69 setattr(desc, k, v)
70 except Exception as es:
71 Log.Error(es)
72
73 @staticmethod
74 def GetUrlHost(url):

Callers 2

UpdateCateGoryBackMethod · 0.80
__init__Method · 0.80

Calls 1

ErrorMethod · 0.80

Tested by

no test coverage detected