• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

maintaince tools for sfjp magazine


Commit MetaInfo

Revision7faebdec2cfb78e8c3d3c89c865fdf0670f6645f (tree)
Time2013-06-26 22:25:49
Authorhylom <hylom@hylo...>
Commiterhylom

Log Message

dirty hack for buggy xmlparser

Change Summary

Incremental Difference

--- a/sfjpmagclient/sfjpmagclient.py
+++ b/sfjpmagclient/sfjpmagclient.py
@@ -4,6 +4,17 @@
44 import xmlrpclib
55 import sys
66
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+
718 HOST_PATH = 'magazine-admin.sourceforge.jp/magazine/xmlrpc.php'
819
920 class MagClient(object):