Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Commit

Permalink
🐛 Fix 'bool' object has no attribute in SmtpSendMailNode #23
Browse files Browse the repository at this point in the history
  • Loading branch information
Ousret committed Apr 13, 2020
1 parent 26dc785 commit f5df8f4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions hermes/automate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ def je_realise(self, source):
for pj_source in [source if self._pj_source is True else None,
self._source_pj_complementaire if self._source_pj_complementaire is not None else None]:

if pj_source is None:
if pj_source is None or not isinstance(pj_source, Source):
continue

try:
Expand Down Expand Up @@ -1373,7 +1373,7 @@ def je_realise(self, source):

m.attachments.by_filename(pj_source.nom_fichier)._cached_part = p

except NotImplemented:
except NotImplementedError:
logger.warning(_("La source '{source_nom}' de type '{source_type}' "
"ne supporte pas la transformation "
"en PJ 'supplémentaire' pour un envoie via SMTP"), source_nom=pj_source.titre,
Expand Down
6 changes: 3 additions & 3 deletions hermes/detecteur.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def je_ne_veux_rien_de_ces_conditions(self, designation, **kwargs):
return self

def je_veux_une_seule_des_conditions(self, designation, **kwargs):
raise NotImplemented
raise NotImplementedError

def je_souhaite_au_moins_une_condition(self, designation, **kwargs):
self._elements.append(
Expand All @@ -247,7 +247,7 @@ def __init__(self, titre, est_obligatoire=False, friendly_name=None):
self._value = None

def __eq__(self, other):
raise NotImplemented
raise NotImplementedError

def __str__(self):
return "Je {negation} '{ma_designation}'".format(negation="contient bien" if self.est_accomplis else "ne contient pas", ma_designation=self._titre)
Expand All @@ -261,7 +261,7 @@ def tester_sur(self, extraction_interet):
:param hermes.ExtractionInteret extraction_interet:
:return:
"""
raise NotImplemented
raise NotImplementedError

@property
def est_obligatoire(self):
Expand Down
16 changes: 8 additions & 8 deletions hermes/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ def extraire(self):
:return: List of extracted Source
:rtype list[Source]
"""
raise NotImplemented
raise NotImplementedError

def copier(self, source, destination):
raise NotImplemented
raise NotImplementedError

def deplacer(self, source, destination):
raise NotImplemented
raise NotImplementedError

def supprimer(self, source):
raise NotImplemented
raise NotImplementedError

def __repr__(self):
return "<SourceFactory::'{}'>".format(self.designation)
Expand Down Expand Up @@ -68,7 +68,7 @@ def factory(self, new_attached_factory):

@property
def raw(self):
raise NotImplemented
raise NotImplementedError

@property
def session(self):
Expand All @@ -80,15 +80,15 @@ def extraction_interet(self):

@property
def titre(self):
raise NotImplemented
raise NotImplementedError

@property
def corps(self):
raise NotImplemented
raise NotImplementedError

@property
def nom_fichier(self):
raise NotImplemented
raise NotImplementedError

@property
def hash(self):
Expand Down

0 comments on commit f5df8f4

Please sign in to comment.