Skip to content

Commit

Permalink
Fix: 修复mod_python环境下出现的Segmentation Fault错误
Browse files Browse the repository at this point in the history
  • Loading branch information
doraemonext committed Sep 10, 2014
1 parent d0cef31 commit b99a0cd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions wechat_sdk/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import json

from xml.dom import minidom
from xml.parsers.expat import ExpatError

from .messages import MESSAGE_TYPES, UnknownMessage
from .exceptions import ParseError, NeedParseError, NeedParamError, OfficialAPIError
Expand Down Expand Up @@ -77,7 +76,7 @@ def parse_data(self, data):

try:
doc = minidom.parseString(data)
except ExpatError:
except Exception:
raise ParseError()

params = [ele for ele in doc.childNodes[0].childNodes
Expand Down

0 comments on commit b99a0cd

Please sign in to comment.