maintaince tools for sfjp magazine
Revision | 7faebdec2cfb78e8c3d3c89c865fdf0670f6645f (tree) |
---|---|
Time | 2013-06-26 22:25:49 |
Author | hylom <hylom@hylo...> |
Commiter | hylom |
dirty hack for buggy xmlparser
@@ -4,6 +4,17 @@ | ||
4 | 4 | import xmlrpclib |
5 | 5 | import sys |
6 | 6 | |
7 | + | |
8 | +# xmlrpclib's ExpatParser has bug, so do not use | |
9 | +org_getparser = xmlrpclib.getparser | |
10 | +def mygetparser(use_datetime=0): | |
11 | + (p, t) = org_getparser(use_datetime) | |
12 | + # if parser is ExpatParser, replace to SlowParser | |
13 | + if isinstance(p, xmlrpclib.ExpatParser): | |
14 | + p = xmlrpclib.SlowParser(p._target) | |
15 | + return (p, t) | |
16 | +xmlrpclib.getparser = mygetparser | |
17 | + | |
7 | 18 | HOST_PATH = 'magazine-admin.sourceforge.jp/magazine/xmlrpc.php' |
8 | 19 | |
9 | 20 | class MagClient(object): |