diff -r 1a24dd2d598e -r 53486417a8e5 cobalt.py --- a/cobalt.py Fri May 23 19:25:37 2014 +0300 +++ b/cobalt.py Sun May 25 15:24:07 2014 +0300 @@ -55,10 +55,16 @@ # # SOAP stuff # -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_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_active = True +except Exception: + pass # # irc_client flags @@ -219,6 +225,9 @@ control ("Recieved bad PRIVMSG: %s" % line) def get_ticket_data (self, replyto, ticket, withlink): + if suds_active == False: + return + data = {} try: data = suds_client.service.mc_issue_get (g_config['trackeruser'], g_config ['trackerpassword'], ticket)