Commit 7c464ab7b6632f06fb8058f01ccca727336d0b96
1 parent
0488a2ce
Exists in
master
and in
1 other branch
Adiciona tratamento de exceção ao converter número por extenso
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
src/AplicaRegras.py
... | ... | @@ -387,8 +387,11 @@ class AplicaRegras(object): |
387 | 387 | singular = self.analisar_plural(it.get_word()) |
388 | 388 | lista_simplificada[it.get_count()][0] = singular |
389 | 389 | |
390 | - if num: | |
391 | - return self.converter_extenso(lista_simplificada) | |
390 | + if num: | |
391 | + try: | |
392 | + return self.converter_extenso(lista_simplificada) | |
393 | + except: | |
394 | + pass | |
392 | 395 | return lista_simplificada |
393 | 396 | |
394 | 397 | # Alterar uma palavra do plural para o singular | ... | ... |