# HG changeset patch # User Santeri Piippo # Date 1402856383 -10800 # Node ID e7999383db5a5661098270695a46dce85e497b05 # Parent 558379fd6d6a1bd9818e5e3ed221d281d1a87272 - don't crash if utf parsing yields an UnicodeDecodeError diff -r 558379fd6d6a -r e7999383db5a cobalt.py --- a/cobalt.py Sat Jun 14 16:24:03 2014 +0300 +++ b/cobalt.py Sun Jun 15 21:19:43 2014 +0300 @@ -38,9 +38,7 @@ import urllib2 import hgapi import os -from suds.xsd.doctor import Import -from suds.xsd.doctor import ImportDoctor -from suds.client import Client +import suds try: with open ('cobalt.json', 'r') as fp: @@ -60,10 +58,8 @@ suds_active = False try: - suds_import = Import ('http://schemas.xmlsoap.org/soap/encoding/', \ - 'http://schemas.xmlsoap.org/soap/encoding/') - suds_client = Client ('https://zandronum.com/tracker/api/soap/mantisconnect.php?wsdl', \ - plugins=[ImportDoctor (suds_import)]) + suds_import = suds.xsd.doctor.Import ('http://schemas.xmlsoap.org/soap/encoding/', 'http://schemas.xmlsoap.org/soap/encoding/') + suds_client = suds.client.Client ('https://zandronum.com/tracker/api/soap/mantisconnect.php?wsdl', plugins=[suds.xsd.doctor.ImportDoctor (suds_import)]) suds_active = True except Exception: pass