abelium: don't crash if "suds" is not installed
This commit is contained in:
parent
673dad0139
commit
37e99f8c46
|
@ -5,12 +5,16 @@ import datetime
|
|||
from xml.etree import ElementTree as etree
|
||||
import logging
|
||||
|
||||
from suds.client import Client
|
||||
from suds.bindings.binding import Binding
|
||||
try:
|
||||
from suds.client import Client
|
||||
from suds.bindings.binding import Binding
|
||||
# Webdev is bugged and using an HTML generator to produce XML content,
|
||||
Binding.replyfilter = lambda self, x: x.replace(' ', ' ')
|
||||
except ImportError:
|
||||
Client = None
|
||||
Binding = None
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
# Webdev is bugged and using an HTML generator to produce XML content,
|
||||
Binding.replyfilter = lambda self, x: x.replace(' ', ' ')
|
||||
|
||||
# cleaning and parsing functions
|
||||
|
||||
|
@ -534,7 +538,6 @@ class DominoWs(object):
|
|||
columns = UrgentContact.COLUMNS
|
||||
urgent_contacts = self('LISTER_PERSONNES_URGENCE',
|
||||
UrgentContact,
|
||||
|
||||
args=((id_enfant, ','.join([x[0] for x in columns]))))
|
||||
return dict([(int(x), x) for x in urgent_contacts])
|
||||
|
||||
|
|
Reference in New Issue