• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

maintaince tools for sfjp magazine


Commit MetaInfo

修订版7faebdec2cfb78e8c3d3c89c865fdf0670f6645f (tree)
时间2013-06-26 22:25:49
作者hylom <hylom@hylo...>
Commiterhylom

Log Message

dirty hack for buggy xmlparser

更改概述

差异

--- 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):